Fixed for diffrent Typeids of Excpetion for diffrent compilation units
This commit is contained in:
parent
6a2b31226e
commit
2c886823e7
1 changed files with 1 additions and 7 deletions
|
|
@ -721,8 +721,6 @@ proc semFor(c: PContext, n: PNode): PNode =
|
||||||
result.typ = enforceVoidContext
|
result.typ = enforceVoidContext
|
||||||
closeScope(c)
|
closeScope(c)
|
||||||
|
|
||||||
var exceptionID = -1
|
|
||||||
|
|
||||||
proc semRaise(c: PContext, n: PNode): PNode =
|
proc semRaise(c: PContext, n: PNode): PNode =
|
||||||
result = n
|
result = n
|
||||||
checkSonsLen(n, 1)
|
checkSonsLen(n, 1)
|
||||||
|
|
@ -735,11 +733,7 @@ proc semRaise(c: PContext, n: PNode): PNode =
|
||||||
# check if the given object inherits from Exception
|
# check if the given object inherits from Exception
|
||||||
var base = typ.lastSon
|
var base = typ.lastSon
|
||||||
while true:
|
while true:
|
||||||
if exceptionID == -1:
|
|
||||||
if base.sym.name.s == "Exception":
|
if base.sym.name.s == "Exception":
|
||||||
exceptionID = base.id
|
|
||||||
break
|
|
||||||
elif base.id == exceptionID:
|
|
||||||
break
|
break
|
||||||
if base.lastSon == nil:
|
if base.lastSon == nil:
|
||||||
localError(n.info, errExprIsNoException)
|
localError(n.info, errExprIsNoException)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue