From 9b378296f65fff962225acc1bef2b3811fffda03 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Wed, 10 Apr 2024 20:41:16 +0800 Subject: fixes addr/hiddenAddr in strictdefs (#23477) --- compiler/semexprs.nim | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'compiler/semexprs.nim') diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 4d0d43662..61d4687a3 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -2198,7 +2198,7 @@ proc semExpandToAst(c: PContext, n: PNode): PNode = let headSymbol = macroCall[0] var cands = 0 var cand: PSym = nil - var o: TOverloadIter + var o: TOverloadIter = default(TOverloadIter) var symx = initOverloadIter(o, c, headSymbol) while symx != nil: if symx.kind in {skTemplate, skMacro} and symx.typ.len == macroCall.len: @@ -2448,9 +2448,7 @@ proc semMagic(c: PContext, n: PNode, s: PSym, flags: TExprFlags; expectedType: P of mAddr: markUsed(c, n.info, s) checkSonsLen(n, 2, c.config) - result[0] = newSymNode(s, n[0].info) - result[1] = semAddrArg(c, n[1]) - result.typ = makePtrType(c, result[1].typ) + result = semAddr(c, n[1]) of mTypeOf: markUsed(c, n.info, s) result = semTypeOf(c, n) @@ -2861,7 +2859,7 @@ proc semExport(c: PContext, n: PNode): PNode = result = newNodeI(nkExportStmt, n.info) for i in 0..