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)
errors.append((func, error_mesg))
# 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
if func_type.is_cyp_class_method:
error_mesg = "Cannot call non-const method on const object"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment