* marks system procs which can raise defects * add tests * add more systemRaisesDefect * add comment
This commit is contained in:
parent
354eb2a86c
commit
0448f30fd9
7 changed files with 26 additions and 19 deletions
|
|
@ -14,7 +14,8 @@ proc canRaiseDisp(p: BProc; n: PNode): bool =
|
|||
if n.kind == nkSym and {sfNeverRaises, sfImportc, sfCompilerProc} * n.sym.flags != {}:
|
||||
result = false
|
||||
elif optPanics in p.config.globalOptions or
|
||||
(n.kind == nkSym and sfSystemModule in getModule(n.sym).flags):
|
||||
(n.kind == nkSym and sfSystemModule in getModule(n.sym).flags and
|
||||
sfSystemRaisesDefect notin n.sym.flags):
|
||||
# we know we can be strict:
|
||||
result = canRaise(n)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue