Corrected tuple type to nkPar for unnamed tuples on getType (#6172)
This commit is contained in:
parent
28737e9a40
commit
0755f902dd
1 changed files with 2 additions and 1 deletions
|
|
@ -224,12 +224,13 @@ proc mapTypeToAstX(t: PType; info: TLineInfo;
|
||||||
result.add copyTree(c)
|
result.add copyTree(c)
|
||||||
of tyTuple:
|
of tyTuple:
|
||||||
if inst:
|
if inst:
|
||||||
result = newNodeX(nkTupleTy)
|
|
||||||
# only named tuples have a node, unnamed tuples don't
|
# only named tuples have a node, unnamed tuples don't
|
||||||
if t.n.isNil:
|
if t.n.isNil:
|
||||||
|
result = newNodeX(nkPar)
|
||||||
for subType in t.sons:
|
for subType in t.sons:
|
||||||
result.add mapTypeToAst(subType, info)
|
result.add mapTypeToAst(subType, info)
|
||||||
else:
|
else:
|
||||||
|
result = newNodeX(nkTupleTy)
|
||||||
for s in t.n.sons:
|
for s in t.n.sons:
|
||||||
result.add newIdentDefs(s)
|
result.add newIdentDefs(s)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue