From: daniloaf Date: Thu, 4 Mar 2010 17:42:57 +0000 (-0300) Subject: Fixed bug on overloaded methods from templated C++ classes and correct X-Git-Tag: 0.13.beta0~327 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fa945265d39d582946ec32bbfaddf05188a784e3;p=cython.git Fixed bug on overloaded methods from templated C++ classes and correct error for "opertator=" --- diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index b234963a..f08ecf2c 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -2092,7 +2092,7 @@ def p_c_simple_declarator(s, ctx, empty, is_type, cmethod_flag, error(s.position(), "Declarator should be empty") s.next() cname = p_opt_cname(s) - if s.sy == '=' and assignable: + if name != "operator" and s.sy == '=' and assignable: s.next() rhs = p_simple_expr(s) else: diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index 240e2c6f..ddb17f10 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -1560,7 +1560,6 @@ class CppClassScope(Scope): error(pos, "no matching function for call to " \ "%s::%s()" % (temp_entry.scope.name, temp_entry.scope.name)) elif not self.default_constructor: - print 5 error(pos, "no matching function for call to %s::%s()" % (self.default_constructor, self.default_constructor)) @@ -1607,11 +1606,16 @@ class CppClassScope(Scope): entry.pos, entry.cname) else: - scope.declare_var(entry.name, - entry.type.specialize(values), - entry.pos, - entry.cname, - entry.visibility) +# scope.declare_var(entry.name, +# entry.type.specialize(values), +# entry.pos, +# entry.cname, +# entry.visibility) + for e in entry.all_alternatives(): + scope.declare_cfunction(e.name, + e.type.specialize(values), + e.pos, + e.cname) return scope