godot/modules/gdscript/tests/scripts/analyzer/errors
George Marques 1ebcb58e69
GDScript: Check if method signature matches the parent
To guarantee polymorphism, a method signature must be compatible with
the parent. This checks if:

1. Return type is the same.
2. The subclass method takes at least the same amount of parameters.
3. The matching parameters have the same type.
4. If the subclass takes more parameters, all of the extra ones have a
default value.
5. If the superclass has default values, so must have the subclass.

There's a few test cases to ensure this holds up.
2022-03-06 11:16:20 -03:00
..
bitwise_float_left_operand.gd
bitwise_float_left_operand.out
bitwise_float_right_operand.gd Add more integration tests to the GDScript test suite 2021-09-15 19:57:39 +02:00
bitwise_float_right_operand.out Add more integration tests to the GDScript test suite 2021-09-15 19:57:39 +02:00
class_name_shadows_builtin_type.gd GDScript: Don't allow builtin type names as identifiers 2021-09-29 11:23:16 -03:00
class_name_shadows_builtin_type.out GDScript: Don't allow builtin type names as identifiers 2021-09-29 11:23:16 -03:00
constant_name_shadows_builtin_type.gd GDScript: Don't allow builtin type names as identifiers 2021-09-29 11:23:16 -03:00
constant_name_shadows_builtin_type.out GDScript: Don't allow builtin type names as identifiers 2021-09-29 11:23:16 -03:00
constant_used_as_function.gd
constant_used_as_function.out
dictionary_duplicate_key_lua_with_string.gd
dictionary_duplicate_key_lua_with_string.out
dictionary_duplicate_key_lua.gd
dictionary_duplicate_key_lua.out
dictionary_duplicate_key_python.gd
dictionary_duplicate_key_python.out
enum_class_var_assign_with_wrong_enum_type.gd GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_class_var_assign_with_wrong_enum_type.out GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_class_var_init_with_wrong_enum_type.gd GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_class_var_init_with_wrong_enum_type.out GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_float_value.gd
enum_float_value.out
enum_local_var_assign_with_wrong_enum_type.gd GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_local_var_assign_with_wrong_enum_type.out GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_local_var_init_with_wrong_enum_type.gd GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_local_var_init_with_wrong_enum_type.out GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_name_shadows_builtin_type.gd GDScript: Don't allow builtin type names as identifiers 2021-09-29 11:23:16 -03:00
enum_name_shadows_builtin_type.out GDScript: Don't allow builtin type names as identifiers 2021-09-29 11:23:16 -03:00
enum_string_value.gd
enum_string_value.out
function_dont_match_parent_signature_parameter_count_less.gd GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
function_dont_match_parent_signature_parameter_count_less.out GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
function_dont_match_parent_signature_parameter_count_more.gd GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
function_dont_match_parent_signature_parameter_count_more.out GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
function_dont_match_parent_signature_parameter_default_values.gd GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
function_dont_match_parent_signature_parameter_default_values.out GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
function_dont_match_parent_signature_parameter_type.gd GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
function_dont_match_parent_signature_parameter_type.out GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
function_dont_match_parent_signature_return_type.gd GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
function_dont_match_parent_signature_return_type.out GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
function_used_as_property.gd
function_used_as_property.out
invalid_array_index.gd
invalid_array_index.out
invalid_concatenation_bool.gd
invalid_concatenation_bool.out
invalid_concatenation_dictionary.gd
invalid_concatenation_dictionary.out
invalid_concatenation_mixed.gd
invalid_concatenation_mixed.out
invalid_constant.gd
invalid_constant.out
leading_number_separator.gd
leading_number_separator.out
missing_argument.gd
missing_argument.out
params_default_forward_reference.gd GDScript: Fix parsing default parameter values from function calls 2022-01-13 19:28:39 -05:00
params_default_forward_reference.out GDScript: Fix parsing default parameter values from function calls 2022-01-13 19:28:39 -05:00
property_function_get_type_error.gd GDScript: Report property type errors 2021-10-08 22:06:15 +02:00
property_function_get_type_error.out GDScript: Report property type errors 2021-10-08 22:06:15 +02:00
property_function_set_type_error.gd GDScript: Report property type errors 2021-10-08 22:06:15 +02:00
property_function_set_type_error.out GDScript: Report property type errors 2021-10-08 22:06:15 +02:00
property_inline_get_type_error.gd GDScript: Report property type errors 2021-10-08 22:06:15 +02:00
property_inline_get_type_error.out GDScript: Report property type errors 2021-10-08 22:06:15 +02:00
property_inline_set_type_error.gd GDScript: Report property type errors 2021-10-08 22:06:15 +02:00
property_inline_set_type_error.out GDScript: Report property type errors 2021-10-08 22:06:15 +02:00
property_used_as_function.gd
property_used_as_function.out
redefine_class_constant.gd
redefine_class_constant.out
redefine_local_constant.gd
redefine_local_constant.out
setter_parameter_uses_property_type.gd GDScript: Make setter parameter type same as variable type 2021-10-12 09:39:23 -03:00
setter_parameter_uses_property_type.out GDScript: Make setter parameter type same as variable type 2021-10-12 09:39:23 -03:00
super_nonexistent_base_method.gd
super_nonexistent_base_method.out
variable_name_shadows_builtin_type.gd GDScript: Don't allow builtin type names as identifiers 2021-09-29 11:23:16 -03:00
variable_name_shadows_builtin_type.out GDScript: Don't allow builtin type names as identifiers 2021-09-29 11:23:16 -03:00