summary refs log blame commit diff stats
path: root/tests/arc/t15909.nim
blob: f25c89daf327814029eeebb4b284d51f0467177f (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)