Commit 4b26e417 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix overloaded functions for C++ classes.

parent dff3c9e0
...@@ -1533,7 +1533,10 @@ class CppClassScope(Scope): ...@@ -1533,7 +1533,10 @@ class CppClassScope(Scope):
api = 0, in_pxd = 0, modifiers = ()): api = 0, in_pxd = 0, modifiers = ()):
if name == self.name.split('::')[-1] and cname is None: if name == self.name.split('::')[-1] and cname is None:
name = '<init>' name = '<init>'
prev_entry = self.lookup_here(name)
entry = self.declare_var(name, type, pos, cname, visibility) entry = self.declare_var(name, type, pos, cname, visibility)
if prev_entry:
entry.overloaded_alternatives = prev_entry.all_alternatives()
def declare_inherited_cpp_attributes(self, base_scope): def declare_inherited_cpp_attributes(self, base_scope):
# Declare entries for all the C++ attributes of an # Declare entries for all the C++ attributes of an
......
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