mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-20 07:51:32 +00:00
Corrected tuple type to nkPar for unnamed tuples on getType (#6172)
This commit is contained in:
committed by
Andreas Rumpf
parent
28737e9a40
commit
0755f902dd
@@ -224,12 +224,13 @@ proc mapTypeToAstX(t: PType; info: TLineInfo;
|
||||
result.add copyTree(c)
|
||||
of tyTuple:
|
||||
if inst:
|
||||
result = newNodeX(nkTupleTy)
|
||||
# only named tuples have a node, unnamed tuples don't
|
||||
if t.n.isNil:
|
||||
result = newNodeX(nkPar)
|
||||
for subType in t.sons:
|
||||
result.add mapTypeToAst(subType, info)
|
||||
else:
|
||||
result = newNodeX(nkTupleTy)
|
||||
for s in t.n.sons:
|
||||
result.add newIdentDefs(s)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user