Commit 5f2a3e3f authored by Xavier Thompson's avatar Xavier Thompson

Allow calling static methods on const objects

parent 53324e72
...@@ -5163,7 +5163,7 @@ def best_match(arg_types, functions, pos=None, env=None, args=None, throw=False) ...@@ -5163,7 +5163,7 @@ def best_match(arg_types, functions, pos=None, env=None, args=None, throw=False)
errors.append((func, error_mesg)) errors.append((func, error_mesg))
continue continue
# Skip non_const methods called on const object # Skip non_const methods called on const object
if func_type.is_const and not func_type.is_const_method: if func_type.is_const and not func_type.is_const_method and not func_type.is_static_method:
# Impose const-correctness only on cypclass methods for now # Impose const-correctness only on cypclass methods for now
if func_type.is_cyp_class_method: if func_type.is_cyp_class_method:
error_mesg = "Cannot call non-const method on const object" error_mesg = "Cannot call non-const method on const object"
......
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