Commit b6390180 authored by Robert Bradshaw's avatar Robert Bradshaw

Another type inference fix.

parent 361b5d08
...@@ -2003,8 +2003,7 @@ class IteratorNode(ExprNode): ...@@ -2003,8 +2003,7 @@ class IteratorNode(ExprNode):
def infer_type(self, env): def infer_type(self, env):
sequence_type = self.sequence.infer_type(env) sequence_type = self.sequence.infer_type(env)
if (sequence_type.is_array or sequence_type.is_ptr) and \ if sequence_type.is_array or sequence_type.is_ptr:
not sequence_type.is_string:
return sequence_type return sequence_type
elif sequence_type.is_cpp_class: elif sequence_type.is_cpp_class:
begin = sequence_type.scope.lookup("begin") begin = sequence_type.scope.lookup("begin")
......
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