Allow stacktrace and linetrace pragmas on procs

This commit is contained in:
Yuriy Glukhov 2018-06-12 12:17:03 +03:00
commit 7e7b85afc7
3 changed files with 23 additions and 2 deletions

View file

@ -1489,6 +1489,7 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
# before compiling the proc body, set as current the scope
# where the proc was declared
let oldScope = c.currentScope
let oldOptions = c.config.options
#c.currentScope = s.scope
pushOwner(c, s)
openScope(c)
@ -1569,6 +1570,8 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
popOwner(c)
pushOwner(c, s)
s.options = c.config.options
c.config.options = oldOptions
if sfOverriden in s.flags or s.name.s[0] == '=': semOverride(c, s, n)
if s.name.s[0] in {'.', '('}:
if s.name.s in [".", ".()", ".="] and {destructor, dotOperators} * c.features == {}: