This commit is contained in:
Fanael Linithien 2020-11-12 09:28:32 +01:00 • committed by GitHub
commit 7d4f70280e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

16
tests/arc/t15909.nim Normal file
View file

@ -0,0 +1,16 @@
discard """
action: run
cmd: "nim c --gc:arc $file"
"""
proc f1() {.noreturn.} = raise newException(CatchableError, "")
proc f2(y: int): int =
if y != 0:
y
else:
f1()
doAssert f2(5) == 5
doAssertRaises(CatchableError):
discard f2(0)