bugfix: field names of tuples are treated consistently in the C backend

This commit is contained in:
Araq 2012-05-27 14:57:12 +02:00
commit 7a249eb8c1
5 changed files with 39 additions and 25 deletions

View file

@ -32,7 +32,7 @@ proc genVarTuple(p: BProc, n: PNode) =
assignLocalVar(p, v)
initLocalVar(p, v, immediateAsgn=true)
initLoc(field, locExpr, t.sons[i], tup.s)
if t.n == nil:
if t.kind == tyTuple:
field.r = ropef("$1.Field$2", [rdLoc(tup), toRope(i)])
else:
if (t.n.sons[i].kind != nkSym): InternalError(n.info, "genVarTuple")