Fix semantic pass with borrowed magic procs (#8945)
Reported by pqflx3 on the forum.
This commit is contained in:
parent
e7d4043406
commit
8670f4911b
2 changed files with 11 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue