bugfix: tuple access in macros (issue #17)

This commit is contained in:
Araq 2011-03-07 00:33:43 +01:00
commit f9c6cec90c
2 changed files with 56 additions and 9 deletions

View file

@ -0,0 +1,21 @@
import macros
macro test*(a: stmt): stmt =
var nodes: tuple[a, b: int]
nodes.a = 4
nodes[1] = 45
type
TTypeEx = object
x, y: int
case b: bool
of false: nil
of true: z: float
var t: TTypeEx
t.b = true
t.z = 4.5
test:
"hi"