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 Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
bitwise_float_left_operand.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
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 Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
constant_used_as_function.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
dictionary_duplicate_key_lua_with_string.gd GDScript: Allow string keys on Lua-style dictionaries 2021-09-15 09:56:24 -03:00
dictionary_duplicate_key_lua_with_string.out GDScript: Allow string keys on Lua-style dictionaries 2021-09-15 09:56:24 -03:00
dictionary_duplicate_key_lua.gd GDScript: Allow string keys on Lua-style dictionaries 2021-09-15 09:56:24 -03:00
dictionary_duplicate_key_lua.out GDScript: Allow string keys on Lua-style dictionaries 2021-09-15 09:56:24 -03:00
dictionary_duplicate_key_python.gd GDScript: Allow string keys on Lua-style dictionaries 2021-09-15 09:56:24 -03:00
dictionary_duplicate_key_python.out GDScript: Allow string keys on Lua-style dictionaries 2021-09-15 09:56:24 -03:00
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 Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
enum_float_value.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
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 Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
enum_string_value.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
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 Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
function_used_as_property.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
invalid_array_index.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
invalid_array_index.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
invalid_concatenation_bool.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
invalid_concatenation_bool.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
invalid_concatenation_dictionary.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
invalid_concatenation_dictionary.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
invalid_concatenation_mixed.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
invalid_concatenation_mixed.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
invalid_constant.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
invalid_constant.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
leading_number_separator.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
leading_number_separator.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
missing_argument.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
missing_argument.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
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 Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
property_used_as_function.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
redefine_class_constant.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
redefine_class_constant.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
redefine_local_constant.gd Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
redefine_local_constant.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
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 Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
super_nonexistent_base_method.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
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