Commit 865e8ea4 authored by Robert Bradshaw's avatar Robert Bradshaw

Vile hack to get tests working.

parent b6390180
......@@ -2226,8 +2226,11 @@ class NextNode(AtomicExprNode):
else:
# Avoid duplication of complicated logic.
fake_index_node = IndexNode(self.pos,
base=self.iterator,
base=self.iterator.sequence,
index=IntNode(self.pos, value='0'))
# TODO(vile hack): infer_type should be side-effect free
if isinstance(self.iterator.sequence, SimpleCallNode):
return py_object_type
return fake_index_node.infer_type(env)
def analyse_types(self, env):
......
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