summary refs log tree commit diff stats
path: root/compiler/pragmas.nim
diff options
context:
space:
mode:
authorYuriy Glukhov <yuriy.glukhov@gmail.com>2018-06-07 16:38:47 +0300
committerYuriy Glukhov <yuriy.glukhov@gmail.com>2018-06-07 17:17:07 +0300
commit29a01da90f395e32fdb5ae88949010700b2c427e (patch)
tree9f7232ed85d2ff698be59ff35523626e017c5583 /compiler/pragmas.nim
parente67eddc91b5e06039498b337763acf718d436aae (diff)
downloadNim-29a01da90f395e32fdb5ae88949010700b2c427e.tar.gz
Fixes #7982
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r--compiler/pragmas.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim
index de98a5e42..d3fa506cb 100644
--- a/compiler/pragmas.nim
+++ b/compiler/pragmas.nim
@@ -374,6 +374,10 @@ proc processPush(c: PContext, n: PNode, start: int) =
       x.otherPragmas.add n.sons[i]
     #localError(c.config, n.info, errOptionExpected)
 
+  # If stacktrace is disabled globally we should not enable it
+  if optStackTrace notin c.optionStack[0].options:
+    c.config.options.excl(optStackTrace)
+
 proc processPop(c: PContext, n: PNode) =
   if c.optionStack.len <= 1:
     localError(c.config, n.info, "{.pop.} without a corresponding {.push.}")