Commit 174886bf authored by Thomas Hunger's avatar Thomas Hunger

The changes for code execution registered the

scope-entry as a variable. This means that
analyse_attribute expects to find a pointer to
a member of the c-object struct.
This is not the case for members, so we need a
special case.
parent 71930383
...@@ -1684,6 +1684,9 @@ class AttributeNode(ExprNode): ...@@ -1684,6 +1684,9 @@ class AttributeNode(ExprNode):
if entry: if entry:
if obj_type.is_extension_type and entry.name == "__weakref__": if obj_type.is_extension_type and entry.name == "__weakref__":
error(self.pos, "Illegal use of special attribute __weakref__") error(self.pos, "Illegal use of special attribute __weakref__")
# methods need the normal attribute lookup
# because they do not have struct entries
if not entry.is_method:
if entry.is_variable or entry.is_cmethod: if entry.is_variable or entry.is_cmethod:
self.type = entry.type self.type = entry.type
self.member = entry.cname self.member = entry.cname
......
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