diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-11 14:15:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-11 14:15:48 +0200 |
commit | 505e15c5238c3026a7f8e2622356ae0937de95ab (patch) | |
tree | 5fe7de3efc9984dd5babb7b12edadb214ccc6626 | |
parent | 1eebf0d789f44870a32a1b36a6609a19647a836f (diff) | |
parent | 06a2d83e30cab0e1deaf232f7e695eca17ed4659 (diff) |
Merge pull request #60732 from CalebJohn/matching_signature_regression_test
2 files changed, 16 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.gd b/modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.gd new file mode 100644 index 0000000000..631e7be5ce --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.gd @@ -0,0 +1,14 @@ +func test(): + var instance := Parent.new() + instance.my_function({"a": 1}) + instance = Child.new() + instance.my_function({"a": 1}) + print("No failure") + +class Parent: + func my_function(_par1: Dictionary = {}) -> void: + pass + +class Child extends Parent: + func my_function(_par1: Dictionary = {}) -> void: + pass diff --git a/modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.out b/modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.out new file mode 100644 index 0000000000..67f0045867 --- /dev/null +++ b/modules/gdscript/tests/scripts/analyzer/features/function_match_parent_signature_with_default_dict_void.out @@ -0,0 +1,2 @@ +GDTEST_OK +No failure |