summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/semstmts.nim8
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim
index 2f69da62a..d804beff5 100644
--- a/compiler/semstmts.nim
+++ b/compiler/semstmts.nim
@@ -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)