Commit 5619c39a authored by Dag Sverre Seljebotn's avatar Dag Sverre Seljebotn

Disallowing buffer indexing as for loop target, as it is not implemented.

parent ade90e67
......@@ -3297,6 +3297,8 @@ class ForFromStatNode(LoopNode, StatNode):
# "Cannot assign integer to variable of type '%s'" % target_type)
if target_type.is_numeric:
self.is_py_target = 0
if isinstance(self.target, ExprNodes.IndexNode) and self.target.is_buffer_access:
raise error(self.pos, "Buffer indexing not allowed as for loop target.")
self.loopvar_name = self.target.entry.cname
self.py_loopvar_node = None
else:
......
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