summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts/analyzer/errors
diff options
context:
space:
mode:
authorocean (they/them) <anvilfolk@gmail.com>2023-09-17 11:34:18 -0400
committerocean (they/them) <anvilfolk@gmail.com>2023-09-17 16:21:28 -0400
commit729c9b4d4b82c88de6adde34fc060fdb8727d116 (patch)
tree4cf88b9d9436bc8d59cdd22167562c4489a74a07 /modules/gdscript/tests/scripts/analyzer/errors
parent4df80b0e629e25653a706f6721c13a1f9d1da368 (diff)
downloadredot-engine-729c9b4d4b82c88de6adde34fc060fdb8727d116.tar.gz
GDScript: Add check for `super()` methods not being implemented
Diffstat (limited to 'modules/gdscript/tests/scripts/analyzer/errors')
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.gd5
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.out2
2 files changed, 7 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.gd b/modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.gd
new file mode 100644
index 0000000000..57dfffdbee
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.gd
@@ -0,0 +1,5 @@
+func _init():
+ super()
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.out b/modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.out
new file mode 100644
index 0000000000..e68759223c
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Cannot call the parent class' virtual function "_init()" because it hasn't been defined.