Files
Nim/tests/compile/tgenerictmpl.nim
2012-09-12 21:48:37 +02:00

13 lines
175 B
Nim

template tmp[T](x: var seq[T]) =
#var yz: T # XXX doesn't work yet
x = @[1, 2, 3]
macro tmp2[T](x: var seq[T]): stmt =
nil
var y: seq[int]
tmp(y)
tmp(y)
echo y.repr