bugfix: semantic checking: tuples without named fields

This commit is contained in:
Araq
2011-01-06 00:33:56 +01:00
parent ce672c19d2
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.typ = n.typ
result = check
elif ty.kind == tyTuple:
elif ty.kind == tyTuple and ty.n != nil:
f = getSymFromList(ty.n, i)
if f != nil:
n.sons[0] = makeDeref(n.sons[0])

View File

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