teffects2.nim 361 B

1234567891011121314151617181920
  1. discard """
  2. errormsg: "can raise an unlisted exception: ref IOError"
  3. line: 19
  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")