summary refs log tree commit diff stats
path: root/compiler/sempass2.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-11-08 19:42:57 +0100
committerAraq <rumpf_a@web.de>2012-11-08 19:42:57 +0100
commitd86f421372058f5a4f7581531f609fc264555543 (patch)
treeceea616d49b6667938b6dd6a3b3dd3d3fd2732dc /compiler/sempass2.nim
parented28f3c8dc342e1b057c3df62ad7da371444891e (diff)
downloadNim-d86f421372058f5a4f7581531f609fc264555543.tar.gz
fixes #247
Diffstat (limited to 'compiler/sempass2.nim')
-rw-r--r--compiler/sempass2.nim5
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim
index 7c6fcf273..80bccee85 100644
--- a/compiler/sempass2.nim
+++ b/compiler/sempass2.nim
@@ -84,7 +84,7 @@ type
   PEffects = var TEffects
 
 proc throws(tracked: PEffects, n: PNode) =
-  tracked.exc.add n
+  if n.typ.kind != tyError: tracked.exc.add n
   
 proc excType(n: PNode): PType =
   assert n.kind != nkRaiseStmt
@@ -240,9 +240,6 @@ proc track(tracked: PEffects, n: PNode) =
   for i in 0 .. <safeLen(n):
     track(tracked, n.sons[i])
 
-# XXX
-# - more tests
-
 proc checkRaisesSpec(spec, real: PNode) =
   # check that any real exception is listed in 'spec'; mark those as used;
   # report any unused exception