bugfix: field names of tuples are treated consistently in the C backend
This commit is contained in:
parent
558d0db89f
commit
7a249eb8c1
5 changed files with 39 additions and 25 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue