mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 18:32:11 +00:00
* move IO subsystem into its own module; refs #10385 * make standalone test compile again * make C++ examples compile again * make more tests green * make sysAssert and gcAssert work again
20 lines
363 B
Nim
20 lines
363 B
Nim
discard """
|
|
errormsg: "can raise an unlisted exception: ref IOError"
|
|
file: "io.nim"
|
|
"""
|
|
|
|
type
|
|
TObj {.pure, inheritable.} = object
|
|
TObjB = object of TObj
|
|
a, b, c: string
|
|
|
|
IO2Error = ref object of IOError
|
|
|
|
proc forw: int {. .}
|
|
|
|
proc lier(): int {.raises: [IO2Error].} =
|
|
writeLine stdout, "arg"
|
|
|
|
proc forw: int =
|
|
raise newException(IOError, "arg")
|