Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
make getType node for generic inst have skipped type
fixes #24503, refs #22655
  • Loading branch information
metagn committed Dec 5, 2024
commit eaf35fd9e5db635a4c7ab88913305cf08c8c0afc
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
Loading