Python points-to: Infer types for comprehensions.

This commit is contained in:
Mark Shannon
2019-07-24 14:58:10 +01:00
parent 12c906c9de
commit 27c0571a86
4 changed files with 11 additions and 5 deletions

View File

@@ -253,6 +253,12 @@ predicate literal_instantiation(ControlFlowNode n, ClassObjectInternal cls, Poin
n instanceof SetNode and cls = ObjectInternal::builtin("set")
or
n.getNode() instanceof ImaginaryLiteral and cls = ObjectInternal::builtin("complex")
or
n.getNode() instanceof ListComp and cls = ObjectInternal::builtin("list")
or
n.getNode() instanceof SetComp and cls = ObjectInternal::builtin("set")
or
n.getNode() instanceof DictComp and cls = ObjectInternal::builtin("dict")
)
}