Files
Nim/tests/macros/tgenericparams.nim
2017-08-30 14:44:11 +02:00

14 lines
310 B
Nim

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()