diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/semstmts.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index fb01127fc..c2392ec8c 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -1173,6 +1173,9 @@ proc semBorrow(c: PContext, n: PNode, s: PSym) = if b != nil: # store the alias: n.sons[bodyPos] = newSymNode(b) + # Carry over the original symbol magic, this is necessary in order to ensure + # the semantic pass is correct + s.magic = b.magic else: localError(c.config, n.info, errNoSymbolToBorrowFromFound) |