fixes #6980
This commit is contained in:
parent
e49f18801c
commit
0b0baece89
3 changed files with 25 additions and 2 deletions
|
|
@ -732,7 +732,7 @@ proc semRaise(c: PContext, n: PNode): PNode =
|
|||
var typ = n.sons[0].typ
|
||||
if typ.kind != tyRef or typ.lastSon.kind != tyObject:
|
||||
localError(n.info, errExprCannotBeRaised)
|
||||
|
||||
|
||||
# check if the given object inherits from Exception
|
||||
var base = typ.lastSon
|
||||
while true:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue