fixes #247
This commit is contained in:
parent
ed28f3c8dc
commit
d86f421372
1 changed files with 1 additions and 4 deletions
|
|
@ -84,7 +84,7 @@ type
|
||||||
PEffects = var TEffects
|
PEffects = var TEffects
|
||||||
|
|
||||||
proc throws(tracked: PEffects, n: PNode) =
|
proc throws(tracked: PEffects, n: PNode) =
|
||||||
tracked.exc.add n
|
if n.typ.kind != tyError: tracked.exc.add n
|
||||||
|
|
||||||
proc excType(n: PNode): PType =
|
proc excType(n: PNode): PType =
|
||||||
assert n.kind != nkRaiseStmt
|
assert n.kind != nkRaiseStmt
|
||||||
|
|
@ -240,9 +240,6 @@ proc track(tracked: PEffects, n: PNode) =
|
||||||
for i in 0 .. <safeLen(n):
|
for i in 0 .. <safeLen(n):
|
||||||
track(tracked, n.sons[i])
|
track(tracked, n.sons[i])
|
||||||
|
|
||||||
# XXX
|
|
||||||
# - more tests
|
|
||||||
|
|
||||||
proc checkRaisesSpec(spec, real: PNode) =
|
proc checkRaisesSpec(spec, real: PNode) =
|
||||||
# check that any real exception is listed in 'spec'; mark those as used;
|
# check that any real exception is listed in 'spec'; mark those as used;
|
||||||
# report any unused exception
|
# report any unused exception
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue