diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2021-12-04 07:44:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-04 07:44:26 +0100 |
commit | 1cbdc1573af5db8bf555b0b6454424188c9f345c (patch) | |
tree | 1fbbbdabf26d95f269dfc440345aa07f898ea2de /tests/effects | |
parent | f90620fb325d5b5b924774ce84384cb4098ed18e (diff) | |
download | Nim-1cbdc1573af5db8bf555b0b6454424188c9f345c.tar.gz |
fixes #19159 [backport:1.6] (#19210)
Diffstat (limited to 'tests/effects')
-rw-r--r-- | tests/effects/tstrict_effects3.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/effects/tstrict_effects3.nim b/tests/effects/tstrict_effects3.nim index 1ab15cc80..4cc461549 100644 --- a/tests/effects/tstrict_effects3.nim +++ b/tests/effects/tstrict_effects3.nim @@ -15,3 +15,15 @@ proc fn(a: int, p1, p2: proc()) {.effectsOf: p1.} = proc main() {.raises: [ValueError].} = fn(1, proc()=discard, proc() = raise newException(IOError, "foo")) main() + +# bug #19159 + +import macros + +func mkEnter() = + template helper = + discard + when defined pass: + helper() + else: + let ast = getAst(helper()) |