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
|
||||
closeScope(c)
|
||||
|
||||
var exceptionID = -1
|
||||
|
||||
proc semRaise(c: PContext, n: PNode): PNode =
|
||||
result = n
|
||||
checkSonsLen(n, 1)
|
||||
|
|
@ -735,11 +733,7 @@ proc semRaise(c: PContext, n: PNode): PNode =
|
|||
# check if the given object inherits from Exception
|
||||
var base = typ.lastSon
|
||||
while true:
|
||||
if exceptionID == -1:
|
||||
if base.sym.name.s == "Exception":
|
||||
exceptionID = base.id
|
||||
break
|
||||
elif base.id == exceptionID:
|
||||
if base.sym.name.s == "Exception":
|
||||
break
|
||||
if base.lastSon == nil:
|
||||
localError(n.info, errExprIsNoException)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue