parent
66db9de714
commit
eca8f1d79f
3 changed files with 45 additions and 0 deletions
22
tests/effects/teffects9.nim
Normal file
22
tests/effects/teffects9.nim
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
discard """
|
||||
errormsg: "can raise an unlisted exception: ref Exception"
|
||||
line: 16
|
||||
"""
|
||||
|
||||
# bug #8481
|
||||
|
||||
type
|
||||
ParentObj = ref object of RootObj
|
||||
DerivedObj = ref object of ParentObj
|
||||
|
||||
method doSome(o: ParentObj) {.base, raises: [].} =
|
||||
discard
|
||||
|
||||
method doSome(o: DerivedObj) =
|
||||
raise newException(Exception, "oops, this raised")
|
||||
|
||||
proc thisRaises() {.raises: [].} =
|
||||
let o = new(DerivedObj)
|
||||
o.doSome()
|
||||
|
||||
thisRaises()
|
||||
Loading…
Add table
Add a link
Reference in a new issue