Python: Adds preliminary modernization

This commit is contained in:
Rebecca Valentine
2020-03-03 16:52:12 -08:00
parent 02ae0fbda6
commit 400a0f5741

View File

@@ -13,16 +13,16 @@
import python
from ExceptFlowNode ex, Object t, ClassObject c, ControlFlowNode origin, string what
from ExceptFlowNode ex, Value t, ClassValue c, ControlFlowNode origin, string what
where ex.handledException(t, c, origin) and
(
exists(ClassObject x | x = t |
exists(ClassValue x | x = t |
not x.isLegalExceptionType() and
not x.failedInference() and
not x.failedInference(_) and
what = "class '" + x.getName() + "'"
)
or
not t instanceof ClassObject and
not t instanceof ClassValue and
what = "instance of '" + c.getName() + "'"
)