Files
Nim/tests/effects/teffects2.nim
2023-05-03 18:30:43 +02:00

21 lines
404 B
Nim

discard """
errormsg: "can raise an unlisted exception: ref IOError"
line: 19
"""
{.push warningAsError[Effect]: on.}
type
TObj {.pure, inheritable.} = object
TObjB = object of TObj
a, b, c: string
EIO2 = ref object of IOError
proc forw: int {.raises: [].}
proc lier(): int {.raises: [IOError].} =
writeLine stdout, "arg"
proc forw: int =
raise newException(IOError, "arg")
{.pop.}