diff options
author | Andrii Riabushenko <cdome@bk.ru> | 2019-07-25 23:07:43 +0100 |
---|---|---|
committer | Andrii Riabushenko <cdome@bk.ru> | 2019-07-25 23:07:43 +0100 |
commit | 95856ab8d3db88709c39c6809e81b8ea539b2e8b (patch) | |
tree | 13e1afde2b2dbf2902159f1a9d1fbc913917f863 /compiler | |
parent | d7bc4e43a2f571623cbc8e720eda072065320ffd (diff) | |
download | Nim-95856ab8d3db88709c39c6809e81b8ea539b2e8b.tar.gz |
add test
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/pragmas.nim | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index 9e3976e73..93ac29027 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -321,8 +321,12 @@ proc processNote(c: PContext, n: PNode) = let x = c.semConstBoolExpr(c, n[1]) n.sons[1] = x - if x.kind == nkIntLit and x.intVal != 0: incl(c.config.notes, nk) - else: excl(c.config.notes, nk) + if x.kind == nkIntLit and x.intVal != 0: + incl(c.config.notes, nk) + incl(c.optionStack[^1].notes, nk) + else: + excl(c.config.notes, nk) + excl(c.optionStack[^1].notes, nk) else: invalidPragma(c, n) |