godot/modules/gdscript
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
..
doc_classes Describe usage of float in range documentation 2022-02-18 00:59:22 +01:00
editor Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
editor_templates Rename motion_velocity to velocity 2022-02-22 23:31:33 -08:00
icons Make script type distinguishable by icon 2022-01-13 12:29:05 +01:00
language_server Convert _notification methods to switch - Chunk C 2022-02-16 13:03:05 -05:00
tests GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
config.py Unregister GDScriptFunctionState class 2020-11-26 21:39:54 -03:00
gdscript.cpp Fix debugger not opening built-in scripts 2022-03-02 17:57:56 +01:00
gdscript.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
gdscript_analyzer.cpp GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
gdscript_analyzer.h GDScript: Check if method signature matches the parent 2022-03-06 11:16:20 -03:00
gdscript_byte_codegen.cpp Merge pull request #55616 from cdemirer/master 2022-01-17 20:16:26 +01:00
gdscript_byte_codegen.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
gdscript_cache.cpp GDScript cache crashfix. 2022-01-22 17:42:54 -08:00
gdscript_cache.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
gdscript_codegen.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
gdscript_compiler.cpp Merge pull request #56830 from strank/parent-signals 2022-03-04 17:29:49 +01:00
gdscript_compiler.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
gdscript_disassembler.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
gdscript_editor.cpp Fixes cyclic detection from variables assigning themselves to themselves in autocomplete, and restricts initialization of variables from other variables which have not been declared above it in class body 2022-02-22 01:21:21 +00:00
gdscript_function.cpp Fix local variables not showing when breaking on final line 2022-02-16 18:12:38 +00:00
gdscript_function.h Return a correctly typed variant in case of a function error to prevent hard crashes 2022-02-17 15:45:19 +00:00
gdscript_lambda_callable.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
gdscript_lambda_callable.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
gdscript_parser.cpp Make 'is_attribute' false during parse error to prevent crash 2022-02-18 12:52:46 +00:00
gdscript_parser.h GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
gdscript_rpc_callable.cpp [Net] Add type check to GDScriptRPCCallable. 2022-02-07 13:39:45 +01:00
gdscript_rpc_callable.h [Net] Add type check to GDScriptRPCCallable. 2022-02-07 13:39:45 +01:00
gdscript_tokenizer.cpp Cleanup and move char functions to the char_utils.h header. 2022-02-04 11:35:01 +02:00
gdscript_tokenizer.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
gdscript_utility_functions.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
gdscript_utility_functions.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
gdscript_vm.cpp Return a correctly typed variant in case of a function error to prevent hard crashes 2022-02-17 15:45:19 +00:00
gdscript_warning.cpp GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
gdscript_warning.h GDScript: Consolidate behavior for assigning enum types 2022-02-03 13:32:16 -03:00
register_types.cpp Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
register_types.h Update copyright statements to 2022 2022-01-03 21:27:34 +01:00
SCsub Improve editor template workflow 2022-01-02 21:52:09 +01:00