summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2023-02-21 14:37:08 -0300
committerGeorge Marques <george@gmarqu.es>2023-02-21 14:37:08 -0300
commit173101077485a6d4828a1600674de80946208100 (patch)
tree1e5071f6afa3d56f142bb2d3bf2d4ac6e895b9b4 /modules/gdscript/tests
parent7e79aead99a53ee7cdf383add9a6a2aea4f15beb (diff)
GDScript: Fix override signature check of script inheritance
Avoid treating the super class as a meta type for signature check, since it is looking at the instance level for that.
Diffstat (limited to 'modules/gdscript/tests')
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.gd10
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.out2
2 files changed, 12 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.gd b/modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.gd
new file mode 100644
index 0000000000..6c056530f6
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.gd
@@ -0,0 +1,10 @@
+func test():
+ print("ok")
+
+# https://github.com/godotengine/godot/issues/71994
+class A:
+ extends RefCounted
+class B:
+ extends A
+ func duplicate():
+ pass
diff --git a/modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.out b/modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.out
new file mode 100644
index 0000000000..1b47ed10dc
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/features/inheritance_signature_check_no_meta.out
@@ -0,0 +1,2 @@
+GDTEST_OK
+ok