diff options
author | Araq <rumpf_a@web.de> | 2012-07-16 23:00:57 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-07-16 23:00:57 +0200 |
commit | 8d99753d6320489e4de8cf186415b0a7be8260b4 (patch) | |
tree | 2008a25dac1df222efc2c205fdf772ba5a533ecc /tests/run/tclosure3.nim | |
parent | 56b4e3ad91a0dda632ba6bab7139665a3da163d3 (diff) | |
download | Nim-8d99753d6320489e4de8cf186415b0a7be8260b4.tar.gz |
preparations for making 'closure' the default calling convention for proc types
Diffstat (limited to 'tests/run/tclosure3.nim')
-rw-r--r-- | tests/run/tclosure3.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/run/tclosure3.nim b/tests/run/tclosure3.nim index b2748035b..bb217387f 100644 --- a/tests/run/tclosure3.nim +++ b/tests/run/tclosure3.nim @@ -6,13 +6,13 @@ discard """ proc main = const n = 30 for iterations in 0..50_000: - var s: seq[proc(): int {.closure.}] = @[] + var s: seq[proc(): string {.closure.}] = @[] for i in 0 .. n-1: let ii = i - s.add(proc(): int = return ii*ii) + s.add(proc(): string = return $(ii*ii)) for i in 0 .. n-1: let val = s[i]() - if val != i*i: echo "bug ", val + if val != $(i*i): echo "bug ", val if getOccupiedMem() > 3000_000: quit("still a leak!") echo "success" |