summary refs log tree commit diff stats
path: root/tests/macros/tgenericparams.nim
blob: d656f045a14a676b5f762cbbf153cc7cecea644b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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()