Commit 971b32d5 authored by Stefan Behnel's avatar Stefan Behnel

fix more places where arrays should be allowed as lvalues

parent db2c854f
...@@ -3414,9 +3414,6 @@ class IndexNode(ExprNode): ...@@ -3414,9 +3414,6 @@ class IndexNode(ExprNode):
elif self.type.is_ptr: elif self.type.is_ptr:
# non-const pointers can always be reassigned # non-const pointers can always be reassigned
return True return True
elif self.type.is_array:
# fixed-sized arrays aren't l-values
return False
# Just about everything else returned by the index operator # Just about everything else returned by the index operator
# can be an lvalue. # can be an lvalue.
return True return True
...@@ -5716,7 +5713,7 @@ class AttributeNode(ExprNode): ...@@ -5716,7 +5713,7 @@ class AttributeNode(ExprNode):
def is_lvalue(self): def is_lvalue(self):
if self.obj: if self.obj:
return not self.type.is_array return True
else: else:
return NameNode.is_lvalue(self) return NameNode.is_lvalue(self)
......
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