Commit 0e4c930b authored by Stefan Behnel's avatar Stefan Behnel

made fields of builtin objects immutable

parent 97cb7314
...@@ -3451,7 +3451,9 @@ class AttributeNode(ExprNode): ...@@ -3451,7 +3451,9 @@ class AttributeNode(ExprNode):
if not target: if not target:
self.is_temp = 1 self.is_temp = 1
self.result_ctype = py_object_type self.result_ctype = py_object_type
elif target and self.obj.type.is_builtin_type:
error(self.pos, "Assignment to an immutable object field")
def analyse_attribute(self, env, obj_type = None): def analyse_attribute(self, env, obj_type = None):
# Look up attribute and set self.type and self.member. # Look up attribute and set self.type and self.member.
self.is_py_attr = 0 self.is_py_attr = 0
......
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