Commit fa945265 authored by daniloaf's avatar daniloaf

Fixed bug on overloaded methods from templated C++ classes and correct

error for "opertator="
parent 026e3de9
......@@ -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:
......
......@@ -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
......
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