mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-06 07:38:24 +00:00
fixes #25407; SIGSEGV when compiling when with typedesc
This commit is contained in:
@@ -491,7 +491,11 @@ proc semAfterMacroCall(c: PContext, call, macroResult: PNode,
|
||||
renderTree(result, {renderNoComments}))
|
||||
result = newSymNode(errorSym(c, result))
|
||||
else:
|
||||
result.typ = makeTypeDesc(c, typ)
|
||||
# Replace with a clean nkType node so that complex expressions
|
||||
# (like `when` statements from template expansion) don't persist
|
||||
# in the AST with potentially uninitialized children that would
|
||||
# cause a SIGSEGV during the transform phase's constant folding.
|
||||
result = newNodeIT(nkType, result.info, makeTypeDesc(c, typ))
|
||||
#result = symNodeFromType(c, typ, n.info)
|
||||
else:
|
||||
if s.ast[genericParamsPos] != nil and retType.isMetaType:
|
||||
|
||||
Reference in New Issue
Block a user