teffects1.nim 367 B

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