This commit is contained in:
Araq 2017-12-27 21:26:37 +01:00
commit 0b0baece89
3 changed files with 25 additions and 2 deletions

View file

@ -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: