summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorVeladus <veladus@web.de>2017-12-02 20:57:18 +0100
committerVeladus <veladus@web.de>2017-12-02 20:57:18 +0100
commit2c886823e77c2244b1407a037e87b9da62f84a92 (patch)
tree41de3d987f5b3a7224fdbd064c18d61d549380f9
parent6a2b31226e1c43b15a2758c3a6bf7495dd7696ca (diff)
downloadNim-2c886823e77c2244b1407a037e87b9da62f84a92.tar.gz
Fixed for diffrent Typeids of Excpetion for diffrent compilation units
-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)