godot/modules/gdscript/tests/scripts/analyzer/features
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
..
as.gd
as.out
auto_inferred_type_dont_error.gd
auto_inferred_type_dont_error.out GDScript: Make all warnings enabled in test generation 2021-10-06 11:39:00 -03:00
call_self_get_name.gd
call_self_get_name.out
call_static_builtin_function.gd
call_static_builtin_function.out
class_from_parent.gd GDScript: Access outer scope classes 2021-10-13 22:39:12 -04:00
class_from_parent.out GDScript: Access outer scope classes 2021-10-13 22:39:12 -04:00
class_inference_is_weak.gd GDScript: Avoid hard errors on inferred types 2021-10-06 11:42:19 -03:00
class_inference_is_weak.out GDScript: Avoid hard errors on inferred types 2021-10-06 11:42:19 -03:00
constants_from_parent.gd
constants_from_parent.out
enum_assign_enum_to_int_typed_var.gd GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_assign_enum_to_int_typed_var.out GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_assign_int_cast_to_same_enum.gd GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_assign_int_cast_to_same_enum.out GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_assign_other_enum_cast_to_same_enum.gd GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_assign_other_enum_cast_to_same_enum.out GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_assign_same_enum.gd GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_assign_same_enum.out GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
enum_from_parent.gd
enum_from_parent.out
enum_is_treated_as_int.gd GDScript: Treat enum values as int and enum types as dictionary 2022-02-03 13:32:34 -03:00
enum_is_treated_as_int.out GDScript: Treat enum values as int and enum types as dictionary 2022-02-03 13:32:34 -03:00
enum_type_is_treated_as_dictionary.gd GDScript: Treat enum values as int and enum types as dictionary 2022-02-03 13:32:34 -03:00
enum_type_is_treated_as_dictionary.out GDScript: Treat enum values as int and enum types as dictionary 2022-02-03 13:32:34 -03:00
enum_value_from_parent.gd
enum_value_from_parent.out
function_match_parent_signature_with_extra_parameters.gd GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
function_match_parent_signature_with_extra_parameters.out GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
gdscript_to_preload.gd
gdscript_to_preload.out
inner_class_as_return_type.gd
inner_class_as_return_type.out
local_inference_is_weak.gd GDScript: Avoid hard errors on inferred types 2021-10-06 11:42:19 -03:00
local_inference_is_weak.out GDScript: Avoid hard errors on inferred types 2021-10-06 11:42:19 -03:00
property_functions.gd GDScript: Report property type errors 2021-10-08 22:06:15 +02:00
property_functions.out GDScript: Report property type errors 2021-10-08 22:06:15 +02:00
property_inline.gd GDScript: Report property type errors 2021-10-08 22:06:15 +02:00
property_inline.out GDScript: Report property type errors 2021-10-08 22:06:15 +02:00
static_method_builtin_type.gd
static_method_builtin_type.out
subscript_self.gd GDScript: Allow subscript on self and object types 2021-10-06 12:01:34 -03:00
subscript_self.out GDScript: Allow subscript on self and object types 2021-10-06 12:01:34 -03:00
typed_array_inferred_access_isnt_constant.gd GDScript: Fix inferred typed array marked as constant 2021-10-15 10:40:50 -03:00
typed_array_inferred_access_isnt_constant.out GDScript: Fix inferred typed array marked as constant 2021-10-15 10:40:50 -03:00
typed_array_with_custom_class.gd GDScript: Fix typed array with custom classes 2021-10-12 10:41:04 -03:00
typed_array_with_custom_class.out GDScript: Fix typed array with custom classes 2021-10-12 10:41:04 -03:00
use_preload_script_as_type.gd
use_preload_script_as_type.out
warning_ignore_annotation.gd GDScript: Add annotation to ignore warnings 2022-01-04 09:32:43 -03:00
warning_ignore_annotation.out GDScript: Add annotation to ignore warnings 2022-01-04 09:32:43 -03:00