Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make getType node for generic inst have skipped type #24509

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
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