bugfix: semantic checking: tuples without named fields

This commit is contained in:
Araq 2011-01-06 00:33:56 +01:00
commit 8f41312ca6
2 changed files with 6 additions and 1 deletions

View file

@ -662,7 +662,7 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode =
check.sons[0] = n check.sons[0] = n
check.typ = n.typ check.typ = n.typ
result = check result = check
elif ty.kind == tyTuple: elif ty.kind == tyTuple and ty.n != nil:
f = getSymFromList(ty.n, i) f = getSymFromList(ty.n, i)
if f != nil: if f != nil:
n.sons[0] = makeDeref(n.sons[0]) n.sons[0] = makeDeref(n.sons[0])

View file

@ -0,0 +1,5 @@
# Bugfix
var v = (5.0, 10.0)
v.setBLAH(10)