mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
fixes #913
This commit is contained in:
18
tests/typerel/tvarargsexpr.nim
Normal file
18
tests/typerel/tvarargsexpr.nim
Normal file
@@ -0,0 +1,18 @@
|
||||
discard """
|
||||
output: '''success'''
|
||||
"""
|
||||
|
||||
#bug #913
|
||||
|
||||
import macros
|
||||
|
||||
macro thirteen(args: varargs[expr]): expr =
|
||||
result = newIntLitNode(13)
|
||||
|
||||
doAssert(13==thirteen([1,2])) # works
|
||||
doAssert(13==thirteen(1,2)) # works
|
||||
|
||||
doAssert(13==thirteen(1,[2])) # does not work
|
||||
doAssert(13==thirteen([1], 2)) # does not work
|
||||
|
||||
echo "success"
|
||||
Reference in New Issue
Block a user