Skip to content

Commit

Permalink
make getType node for generic inst have skipped type
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Dec 5, 2024
1 parent 33dc236 commit eaf35fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/vmdeps.nim
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ proc mapTypeToAstX(cache: IdentCache; t: PType; info: TLineInfo;
if inst:
if allowRecursion:
result = mapTypeToAstR(t.skipModifier, info)
# keep original type info for getType calls on the output node:
result.typ() = t
# result.typ can be tyGenericBody, give it a proper type:
result.typ() = t.skipModifier
else:
result = newNodeX(nkBracketExpr)
#result.add mapTypeToAst(t.last, info)
Expand All @@ -145,8 +145,8 @@ proc mapTypeToAstX(cache: IdentCache; t: PType; info: TLineInfo;
result.add mapTypeToAst(a, info)
else:
result = mapTypeToAstX(cache, t.skipModifier, info, idgen, inst, allowRecursion)
# keep original type info for getType calls on the output node:
result.typ() = t
# result.typ can be tyGenericBody, give it a proper type:
result.typ() = t.skipModifier
of tyGenericBody:
if inst:
result = mapTypeToAstR(t.typeBodyImpl, info)
Expand Down

0 comments on commit eaf35fd

Please sign in to comment.