Commit 89af9c2d authored by Robert Bradshaw's avatar Robert Bradshaw

Fix C++ iteration inference.

parent ad0a4bf8
......@@ -1998,6 +1998,9 @@ class IteratorNode(ExprNode):
PyrexTypes.CFuncTypeArg("it", PyrexTypes.py_object_type, None),
]))
def type_dependencies(self, env):
return self.sequence.type_dependencies(env)
def infer_type(self, env):
sequence_type = self.sequence.infer_type(env)
if (sequence_type.is_array or sequence_type.is_ptr) and \
......@@ -2204,7 +2207,10 @@ class NextNode(AtomicExprNode):
def __init__(self, iterator):
self.pos = iterator.pos
self.iterator = iterator
def type_dependencies(self, env):
return self.iterator.type_dependencies(env)
def infer_type(self, env, iterator_type = None):
if iterator_type is None:
iterator_type = self.iterator.infer_type(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