mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-18 06:51:18 +00:00
Fixed for diffrent Typeids of Excpetion for diffrent compilation units
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user