teffects2.nim 362 B

123456789101112131415161718192021
  1. discard """
  2. line: 19
  3. errormsg: "can raise an unlisted exception: ref IOError"
  4. """
  5. type
  6. TObj = object {.pure, inheritable.}
  7. TObjB = object of TObj
  8. a, b, c: string
  9. EIO2 = ref object of IOError
  10. proc forw: int {.raises: [].}
  11. proc lier(): int {.raises: [IOError].} =
  12. writeLine stdout, "arg"
  13. proc forw: int =
  14. raise newException(IOError, "arg")