summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-05-31 02:27:05 +0200
committerAraq <rumpf_a@web.de>2013-05-31 02:27:05 +0200
commit24955f83584de89d3222d409d499b01d42f4e83e (patch)
tree3c7b032cc991fb69d879e6862fa7f2c073d44846 /compiler
parent1c6ce881ecfa9b6a1ea68c278d7bda8f6c032fc4 (diff)
downloadNim-24955f83584de89d3222d409d499b01d42f4e83e.tar.gz
fixes #458
Diffstat (limited to 'compiler')
-rw-r--r--compiler/semexprs.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim
index e07821d1f..03730f30c 100644
--- a/compiler/semexprs.nim
+++ b/compiler/semexprs.nim
@@ -920,7 +920,7 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode =
           result = check
   elif ty.kind == tyTuple and ty.n != nil: 
     f = getSymFromList(ty.n, i)
-    if f != nil: 
+    if f != nil:
       n.sons[0] = makeDeref(n.sons[0])
       n.sons[1] = newSymNode(f)
       n.typ = f.typ
@@ -1582,6 +1582,7 @@ proc semTupleFieldsConstr(c: PContext, n: PNode, flags: TExprFlags): PNode =
                                         flags*{efAllowDestructor})
     var f = newSymS(skField, n.sons[i].sons[0], c)
     f.typ = skipIntLit(n.sons[i].sons[1].typ)
+    f.position = i
     rawAddSon(typ, f.typ)
     addSon(typ.n, newSymNode(f))
     n.sons[i].sons[0] = newSymNode(f)