diff options
author | Arne Döring <arne.doering@gmx.net> | 2018-12-05 00:42:56 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-12-11 21:23:22 +0100 |
commit | 3859878db8e6da15d3513c931e0d811dcf03b250 (patch) | |
tree | 79aab58631e0e22adba353143e2fda3f7370c506 /tests/overload | |
parent | 2a4c09ff8887350ec3fa283fe8d562e71b68406b (diff) | |
download | Nim-3859878db8e6da15d3513c931e0d811dcf03b250.tar.gz |
megatest checks output and nimout
Diffstat (limited to 'tests/overload')
-rw-r--r-- | tests/overload/toverload_issues.nim | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/tests/overload/toverload_issues.nim b/tests/overload/toverload_issues.nim index 7980f51a9..fe1603a44 100644 --- a/tests/overload/toverload_issues.nim +++ b/tests/overload/toverload_issues.nim @@ -119,28 +119,24 @@ template test(loopCount: int, testBody: untyped): typed = test(loopCount, 0, testBody) echo "done extraI passed 0" -when isMainModule: - var - loops = 0 - - test 0, 0: - loops += 1 - echo "test 0 complete, loops=", loops - - test 1, 1.0: - loops += 1 - echo "test 1.0 complete, loops=", loops - - when true: - # when true we get the following compile time error: - # b.nim(35, 6) Error: expression 'loops += 1' has no type (or is ambiguous) - loops = 0 - test 2: - loops += 1 - echo "test no extra complete, loops=", loops +var + loops = 0 +test 0, 0: + loops += 1 +echo "test 0 complete, loops=", loops +test 1, 1.0: + loops += 1 +echo "test 1.0 complete, loops=", loops +when true: + # when true we get the following compile time error: + # b.nim(35, 6) Error: expression 'loops += 1' has no type (or is ambiguous) + loops = 0 + test 2: + loops += 1 + echo "test no extra complete, loops=", loops # bug #2229 type |