summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-10-13 07:00:52 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-10-13 07:00:52 +0200
commit5dca695bcfaad7212679c80b3219e0f69afdca7d (patch)
tree860c0285ade5b82b7a95418345eccbab4e5783b2 /tests
parentffe52a7f7bab134468b2cfcefc6414504830134b (diff)
downloadNim-5dca695bcfaad7212679c80b3219e0f69afdca7d.tar.gz
new destroyer pass works with procs too
Diffstat (limited to 'tests')
-rw-r--r--tests/destructor/tcustomstrings.nim5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/destructor/tcustomstrings.nim b/tests/destructor/tcustomstrings.nim
index afd2fa838..2250d4772 100644
--- a/tests/destructor/tcustomstrings.nim
+++ b/tests/destructor/tcustomstrings.nim
@@ -78,11 +78,11 @@ proc create*(lit: string): mystring =
   copyMem(addr result.data[result.len], unsafeAddr lit[0], newLen + 1)
   result.len = newLen
 
-func `&`*(a, b: mystring): mystring =
+proc `&`*(a, b: mystring): mystring =
   result = a
   result.add b
 
-func main(n: int) =
+proc main(n: int) =
   var a: mystring
   let b = create" to append"
   for i in 0..<n:
@@ -92,6 +92,5 @@ func main(n: int) =
     a.add c
     echo cstring(a.data)
 
-
 main(1000)
 echo "after ", allocCount, " ", deallocCount