diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 3e753aefdf05b..603d730ed6ded 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -2204,6 +2204,7 @@ proc semSizeof(c: PContext, n: PNode): PNode = proc semMagic(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode = # this is a hotspot in the compiler! result = n + if result.len > 1 and result[1].kind == nkEarlySemArg: result[1] = result[1][0] case s.magic # magics that need special treatment of mAddr: markUsed(c, n.info, s) @@ -2239,7 +2240,6 @@ proc semMagic(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode = markUsed(c, n.info, s) result = semQuoteAst(c, n) of mAstToStr: - if n[1].kind == nkEarlySemArg: n[1] = n[1][0] markUsed(c, n.info, s) checkSonsLen(n, 2, c.config) result = newStrNodeT(renderTree(n[1], {renderNoComments}), n, c.graph)