diff options
author | BigEpsilon <BigEpsilon@users.noreply.github.com> | 2017-08-30 14:44:11 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-08-30 14:44:11 +0200 |
commit | 6f6e6fe4eb812e78e087919b69c6b1d023c8536f (patch) | |
tree | 9d78be12ee644a51fc5335b01431e3d916918a77 /tests/macros | |
parent | 28da04c1f7336a4eecc22e3eaa85cb9fe1b30e77 (diff) | |
download | Nim-6f6e6fe4eb812e78e087919b69c6b1d023c8536f.tar.gz |
Fix #6295 (#6296)
Diffstat (limited to 'tests/macros')
-rw-r--r-- | tests/macros/tgenericparams.nim | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/macros/tgenericparams.nim b/tests/macros/tgenericparams.nim new file mode 100644 index 000000000..d656f045a --- /dev/null +++ b/tests/macros/tgenericparams.nim @@ -0,0 +1,13 @@ +discard """ +output: '''proc foo[T, N: static[int]]() +proc foo[T; N: static[int]]()''' +""" +import macros + +macro test():string = + let expr0 = "proc foo[T, N: static[int]]()" + let expr1 = "proc foo[T; N: static[int]]()" + + $toStrLit(parseExpr(expr0)) & "\n" & $toStrLit(parseExpr(expr1)) + +echo test() |