summary refs log tree commit diff stats
path: root/tests/overload
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2017-07-25 09:28:23 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-07-25 09:28:23 +0200
commit000b8afd26fa16684a116d9afe798ea94df9c270 (patch)
treee5295df748b90c5027e44adfa3a442031534572c /tests/overload
parent52ff244d5d2775fa4d13f4e2b9a996f411281312 (diff)
downloadNim-000b8afd26fa16684a116d9afe798ea94df9c270.tar.gz
Remove expr/stmt (#5857)
Diffstat (limited to 'tests/overload')
-rw-r--r--tests/overload/tparams_after_varargs.nim8
-rw-r--r--tests/overload/tspec.nim2
-rw-r--r--tests/overload/tstmtoverload.nim6
3 files changed, 9 insertions, 7 deletions
diff --git a/tests/overload/tparams_after_varargs.nim b/tests/overload/tparams_after_varargs.nim
index a93e280b9..ad8f19ad3 100644
--- a/tests/overload/tparams_after_varargs.nim
+++ b/tests/overload/tparams_after_varargs.nim
@@ -1,7 +1,8 @@
 discard """
   output: '''a 1 b 2 x @[3, 4, 5] y 6 z 7
 yay
-12'''
+12
+'''
 """
 
 proc test(a, b: int, x: varargs[int]; y, z: int) =
@@ -9,9 +10,10 @@ proc test(a, b: int, x: varargs[int]; y, z: int) =
 
 test 1, 2, 3, 4, 5, 6, 7
 
-template takesBlock(a, b: int, x: varargs[expr]; blck: stmt) =
+# XXX maybe this should also work with ``varargs[untyped]``
+template takesBlockA(a, b: untyped; x: varargs[typed]; blck: untyped): untyped =
   blck
   echo a, b
 
-takesBlock 1, 2, "some", 0.90, "random stuff":
+takesBlockA 1, 2, "some", 0.90, "random stuff":
   echo "yay"
diff --git a/tests/overload/tspec.nim b/tests/overload/tspec.nim
index f2002a390..a84bac244 100644
--- a/tests/overload/tspec.nim
+++ b/tests/overload/tspec.nim
@@ -71,7 +71,7 @@ var ri: ref int
 gen(ri) # "ref T"
 
 
-template rem(x: expr) = discard
+template rem(x) = discard
 #proc rem[T](x: T) = discard
 
 rem unresolvedExpression(undeclaredIdentifier)
diff --git a/tests/overload/tstmtoverload.nim b/tests/overload/tstmtoverload.nim
index 75584bcab..7c0194e60 100644
--- a/tests/overload/tstmtoverload.nim
+++ b/tests/overload/tstmtoverload.nim
@@ -2,17 +2,17 @@
 # bug #2481
 import math
 
-template test(loopCount: int, extraI: int, testBody: stmt): stmt =
+template test(loopCount: int, extraI: int, testBody: untyped): typed =
   block:
     for i in 0..loopCount-1:
       testBody
     echo "done extraI=", extraI
 
-template test(loopCount: int, extraF: float, testBody: stmt): stmt =
+template test(loopCount: int, extraF: float, testBody: untyped): typed =
   block:
     test(loopCount, round(extraF).int, testBody)
 
-template test(loopCount: int, testBody: stmt): stmt =
+template test(loopCount: int, testBody: untyped): typed =
   block:
     test(loopCount, 0, testBody)
     echo "done extraI passed 0"