Fix overloaded functions for C++ classes.
authorRobert Bradshaw <robertwb@math.washington.edu>
Mon, 8 Feb 2010 19:18:52 +0000 (11:18 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Mon, 8 Feb 2010 19:18:52 +0000 (11:18 -0800)
Cython/Compiler/Symtab.py

index da9522810daa796bccd7dbfca6a2f966d0e138be..6bde21fa6ad09663c97731ca2c16c3f2f7f60adb 100644 (file)
@@ -1533,7 +1533,10 @@ class CppClassScope(Scope):
             api = 0, in_pxd = 0, modifiers = ()):
         if name == self.name.split('::')[-1] and cname is None:
             name = '<init>'
+        prev_entry = self.lookup_here(name)
         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):
         # Declare entries for all the C++ attributes of an