summary refs log tree commit diff stats
path: root/compiler/semstmts.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/semstmts.nim')
-rw-r--r--compiler/semstmts.nim3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 455e06e82..b4c327362 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -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 == {}: