Remove expr/stmt (#5857)
This commit is contained in:
parent
52ff244d5d
commit
000b8afd26
168 changed files with 497 additions and 529 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue