fixes #19159 [backport:1.6] (#19210)

This commit is contained in:
Andreas Rumpf 2021-12-04 07:44:26 +01:00 • committed by GitHub
commit 1cbdc1573a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 3 deletions

View file

@ -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())