From 29a01da90f395e32fdb5ae88949010700b2c427e Mon Sep 17 00:00:00 2001 From: Yuriy Glukhov Date: Thu, 7 Jun 2018 16:38:47 +0300 Subject: Fixes #7982 --- compiler/pragmas.nim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/pragmas.nim') 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.}") -- cgit 1.4.1-2-gfad0