implemented generic templates

This commit is contained in:
Araq 2012-08-27 01:59:14 +02:00
commit 6bcdb9c8f4
7 changed files with 47 additions and 26 deletions

View file

@ -0,0 +1,8 @@
template tmp[T](x: var seq[T]) =
var yz: T
x = @[1, 2, 3]
var y: seq[int]
tmp(y)
echo y.repr