Commit de79649d authored by samaingw's avatar samaingw

Fix is_cpp flag for function overriding in Scope.declare

parent db4e3903
......@@ -485,7 +485,7 @@ class Scope(object):
# Reject redeclared C++ functions only if they have the same type signature.
cpp_override_allowed = False
if type.is_cfunction and old_entry.type.is_cfunction and self.is_cpp_class_scope:
if type.is_cfunction and old_entry.type.is_cfunction and self.is_cpp():
for index, alt_entry in enumerate(old_entry.all_alternatives()):
if type.compatible_signature_with(alt_entry.type):
if alt_entry.is_inherited:
......
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