exception tracking should work

This commit is contained in:
Araq 2012-11-04 18:09:15 +01:00
commit 6dd2c2d767
7 changed files with 105 additions and 18 deletions

View file

@ -0,0 +1,20 @@
discard """
line: 16
errormsg: "instantiation from here"
"""
type
TObj = object {.pure, inheritable.}
TObjB = object of TObj
a, b, c: string
EIO2 = ref object of EIO
proc forw: int {. .}
proc lier(): int {.raises: [EIO2].} =
writeln stdout, "arg"
proc forw: int =
raise newException(EIO, "arg")

View file

@ -0,0 +1,20 @@
discard """
line: 13
errormsg: "instantiation from here"
"""
type
TObj = object {.pure, inheritable.}
TObjB = object of TObj
a, b, c: string
EIO2 = ref object of EIO
proc forw: int {.raises: [].}
proc lier(): int {.raises: [EIO].} =
writeln stdout, "arg"
proc forw: int =
raise newException(EIO, "arg")

View file

@ -5,11 +5,13 @@ discard """
type
Test = object of TObject
method doMethod(a: ref TObject) =
method doMethod(a: ref TObject) {.raises: [EIO].} =
quit "override"
method doMethod(a: ref Test) =
echo "hello"
if a == nil:
raise newException(EIO, "arg")
proc doProc(a: ref Test) =
echo "hello"