Commit f2d9322f authored by Stefan Behnel's avatar Stefan Behnel

fix usages of all()/any() after deleting fallback implementations in Utils.py

parent 9f1f8025
...@@ -3305,8 +3305,7 @@ class IndexNode(ExprNode): ...@@ -3305,8 +3305,7 @@ class IndexNode(ExprNode):
for pos, specific_type, fused_type in zip(positions, for pos, specific_type, fused_type in zip(positions,
specific_types, specific_types,
fused_types): fused_types):
if not Utils.any([specific_type.same_as(t) if not any([specific_type.same_as(t) for t in fused_type.types]):
for t in fused_type.types]):
return error(pos, "Type not in fused type") return error(pos, "Type not in fused type")
if specific_type is None or specific_type.is_error: if specific_type is None or specific_type.is_error:
......
...@@ -449,7 +449,7 @@ class SimpleAssignmentTypeInferer(object): ...@@ -449,7 +449,7 @@ class SimpleAssignmentTypeInferer(object):
entry_type = py_object_type entry_type = py_object_type
if assmts_resolved.issuperset(entry.cf_assignments): if assmts_resolved.issuperset(entry.cf_assignments):
types = [assmt.inferred_type for assmt in entry.cf_assignments] types = [assmt.inferred_type for assmt in entry.cf_assignments]
if types and Utils.all(types): if types and all(types):
entry_type = spanning_type( entry_type = spanning_type(
types, entry.might_overflow, entry.pos) types, entry.might_overflow, entry.pos)
inferred.add(entry) inferred.add(entry)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment