virtualx-engine/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 Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
as.out Add dozens of new integration tests to the GDScript test suite 2021-09-14 18:42:08 +02:00
auto_inferred_type_dont_error.gd GDScript: Avoid inferred types from giving hard errors 2021-09-17 11:52:30 -03:00
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 Correct null and boolean values being capitalised by the str command 2021-08-26 17:11:34 +10:00
call_static_builtin_function.gd GDScript: Fix calling builtin static functions 2021-08-18 18:58:41 -03:00
call_static_builtin_function.out Correct null and boolean values being capitalised by the str command 2021-08-26 17:11:34 +10:00
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 GDScript: Allow access to outer constant and enum values 2021-08-24 14:45:51 -03:00
constants_from_parent.out Fix GDScript test cases 2021-09-13 15:02:01 -03:00
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 GDScript: Allow access to outer constant and enum values 2021-08-24 14:45:51 -03:00
enum_from_parent.out Fix GDScript test cases 2021-09-13 15:02:01 -03:00
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 GDScript: Allow access to outer constant and enum values 2021-08-24 14:45:51 -03:00
enum_value_from_parent.out Fix GDScript test cases 2021-09-13 15:02:01 -03:00
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: Fix inner classes and preloaded scripts as types 2021-08-18 18:56:21 -03:00
gdscript_to_preload.out GDScript: Fix inner classes and preloaded scripts as types 2021-08-18 18:56:21 -03:00
inner_class_as_return_type.gd GDScript: Fix inner classes and preloaded scripts as types 2021-08-18 18:56:21 -03:00
inner_class_as_return_type.out GDScript: Fix inner classes and preloaded scripts as types 2021-08-18 18:56:21 -03:00
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 Add more integration tests to the GDScript test suite 2021-09-15 19:57:39 +02:00
static_method_builtin_type.out Add more integration tests to the GDScript test suite 2021-09-15 19:57:39 +02:00
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 GDScript: Fix inner classes and preloaded scripts as types 2021-08-18 18:56:21 -03:00
use_preload_script_as_type.out GDScript: Fix inner classes and preloaded scripts as types 2021-08-18 18:56:21 -03:00
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