diff options
Diffstat (limited to 'compiler/sem.nim')
-rw-r--r-- | compiler/sem.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/sem.nim b/compiler/sem.nim index e4ef6473f..8025ef70d 100644 --- a/compiler/sem.nim +++ b/compiler/sem.nim @@ -305,7 +305,9 @@ proc semAfterMacroCall(c: PContext, n: PNode, s: PSym, proc semMacroExpr(c: PContext, n, nOrig: PNode, sym: PSym, flags: TExprFlags = {}): PNode = - markUsed(n, sym) + pushInfoContext(nOrig.info) + + markUsed(n.info, sym) if sym == c.p.owner: globalError(n.info, errRecursiveDependencyX, sym.name.s) @@ -315,6 +317,7 @@ proc semMacroExpr(c: PContext, n, nOrig: PNode, sym: PSym, result = evalMacroCall(c.module, n, nOrig, sym) if efNoSemCheck notin flags: result = semAfterMacroCall(c, result, sym, flags) + popInfoContext() proc forceBool(c: PContext, n: PNode): PNode = result = fitNode(c, getSysType(tyBool), n) |