Commit 225dec0a authored by Xavier Thompson's avatar Xavier Thompson

Fix code generation when overloaded cpp methods have different c names

parent 40c01a16
......@@ -7578,6 +7578,9 @@ class AttributeNode(ExprNode):
if obj.type.is_builtin_type and self.entry and self.entry.is_variable:
# accessing a field of a builtin type, need to cast better than result_as() does
obj_code = obj.type.cast_code(obj.result(), to_object_struct = True)
if obj.type.is_cpp_class and self.entry and self.entry.is_cfunction:
# the entry might have been resolved to an overladed alternative in the meantime
self.member = self.entry.cname
if obj.type.is_cyp_class and self.entry and self.entry.from_type:
self.member = "%s::%s" % (self.entry.from_type.empty_declaration_code(), self.member)
return "%s%s%s" % (obj_code, self.op, self.member)
......
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