tgenericparams.nim 310 B

1234567891011121314
  1. discard """
  2. output: '''proc foo[T, N: static[int]]()
  3. proc foo[T; N: static[int]]()'''
  4. """
  5. import macros
  6. macro test():string =
  7. let expr0 = "proc foo[T, N: static[int]]()"
  8. let expr1 = "proc foo[T; N: static[int]]()"
  9. $toStrLit(parseExpr(expr0)) & "\n" & $toStrLit(parseExpr(expr1))
  10. echo test()