Commit b4956d52 authored by Stefan Behnel's avatar Stefan Behnel

use correct entry for overflow checks when inferring name node types

parent 1a4c6b5d
...@@ -383,6 +383,7 @@ class SimpleAssignmentTypeInferer(object): ...@@ -383,6 +383,7 @@ class SimpleAssignmentTypeInferer(object):
if not types: if not types:
node_type = py_object_type node_type = py_object_type
else: else:
entry = node.entry
node_type = spanning_type( node_type = spanning_type(
types, entry.might_overflow, entry.pos) types, entry.might_overflow, entry.pos)
node.inferred_type = node_type node.inferred_type = node_type
...@@ -392,6 +393,7 @@ class SimpleAssignmentTypeInferer(object): ...@@ -392,6 +393,7 @@ class SimpleAssignmentTypeInferer(object):
if assmt.inferred_type is not None] if assmt.inferred_type is not None]
if not types: if not types:
return return
entry = node.entry
return spanning_type(types, entry.might_overflow, entry.pos) return spanning_type(types, entry.might_overflow, entry.pos)
def resolve_assignments(assignments): def resolve_assignments(assignments):
...@@ -407,7 +409,7 @@ class SimpleAssignmentTypeInferer(object): ...@@ -407,7 +409,7 @@ class SimpleAssignmentTypeInferer(object):
done = False done = False
assmts_resolved.add(assmt) assmts_resolved.add(assmt)
resolved.add(assmt) resolved.add(assmt)
assignments -= resolved assignments.difference_update(resolved)
return resolved return resolved
def partial_infer(assmt): def partial_infer(assmt):
......
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