summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts
diff options
context:
space:
mode:
authorocean (they/them) <anvilfolk@gmail.com>2023-06-21 15:13:45 -0400
committerocean (they/them) <anvilfolk@gmail.com>2023-06-21 15:13:45 -0400
commit6c28b8edd3bd43c28c4c5671b4b1800e14b47949 (patch)
tree0c0e2e551e8659077d76809f08a4ef9ff421d9e3 /modules/gdscript/tests/scripts
parent28a60b3de02e8cfcc742a248078e6b7ee8f728b1 (diff)
downloadredot-engine-6c28b8edd3bd43c28c4c5671b4b1800e14b47949.tar.gz
GDScript: fix regression when checking for virtual function implementation.
Unfortunately it appears the virtual function checks in #77324 are not trustworthy at runtime, because objects can have scripts attached, but this information is not always available at compile-time. These checks need to be removed. The rest of the PR is still useful, making all method flags available to the analyzer, so a full revert isn't necessary/desirable. This reopens #76938, which will need another solution.
Diffstat (limited to 'modules/gdscript/tests/scripts')
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/virtual_method_not_implemented.gd2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/virtual_method_not_implemented.out2
-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
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/virtual_method_implemented.gd11
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/virtual_method_implemented.out1
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/virtual_super_implemented.gd10
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/virtual_super_implemented.out1
8 files changed, 0 insertions, 34 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/virtual_method_not_implemented.gd b/modules/gdscript/tests/scripts/analyzer/errors/virtual_method_not_implemented.gd
deleted file mode 100644
index c34d927035..0000000000
--- a/modules/gdscript/tests/scripts/analyzer/errors/virtual_method_not_implemented.gd
+++ /dev/null
@@ -1,2 +0,0 @@
-func test():
- _get_property_list()
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/virtual_method_not_implemented.out b/modules/gdscript/tests/scripts/analyzer/errors/virtual_method_not_implemented.out
deleted file mode 100644
index ce2f49a5e5..0000000000
--- a/modules/gdscript/tests/scripts/analyzer/errors/virtual_method_not_implemented.out
+++ /dev/null
@@ -1,2 +0,0 @@
-GDTEST_ANALYZER_ERROR
-Cannot call virtual function "_get_property_list()" because it hasn't been defined.
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
deleted file mode 100644
index 57dfffdbee..0000000000
--- a/modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.gd
+++ /dev/null
@@ -1,5 +0,0 @@
-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
deleted file mode 100644
index e68759223c..0000000000
--- a/modules/gdscript/tests/scripts/analyzer/errors/virtual_super_not_implemented.out
+++ /dev/null
@@ -1,2 +0,0 @@
-GDTEST_ANALYZER_ERROR
-Cannot call the parent class' virtual function "_init()" because it hasn't been defined.
diff --git a/modules/gdscript/tests/scripts/analyzer/features/virtual_method_implemented.gd b/modules/gdscript/tests/scripts/analyzer/features/virtual_method_implemented.gd
deleted file mode 100644
index 1aacd1d11c..0000000000
--- a/modules/gdscript/tests/scripts/analyzer/features/virtual_method_implemented.gd
+++ /dev/null
@@ -1,11 +0,0 @@
-class TestOne:
- func _get_property_list():
- return {}
-
-class TestTwo extends TestOne:
- func _init():
- var _x = _get_property_list()
-
-func test():
- var x = TestTwo.new()
- var _x = x._get_property_list()
diff --git a/modules/gdscript/tests/scripts/analyzer/features/virtual_method_implemented.out b/modules/gdscript/tests/scripts/analyzer/features/virtual_method_implemented.out
deleted file mode 100644
index d73c5eb7cd..0000000000
--- a/modules/gdscript/tests/scripts/analyzer/features/virtual_method_implemented.out
+++ /dev/null
@@ -1 +0,0 @@
-GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/analyzer/features/virtual_super_implemented.gd b/modules/gdscript/tests/scripts/analyzer/features/virtual_super_implemented.gd
deleted file mode 100644
index c447003619..0000000000
--- a/modules/gdscript/tests/scripts/analyzer/features/virtual_super_implemented.gd
+++ /dev/null
@@ -1,10 +0,0 @@
-class TestOne:
- func _init():
- pass
-
-class TestTwo extends TestOne:
- func _init():
- super()
-
-func test():
- pass
diff --git a/modules/gdscript/tests/scripts/analyzer/features/virtual_super_implemented.out b/modules/gdscript/tests/scripts/analyzer/features/virtual_super_implemented.out
deleted file mode 100644
index d73c5eb7cd..0000000000
--- a/modules/gdscript/tests/scripts/analyzer/features/virtual_super_implemented.out
+++ /dev/null
@@ -1 +0,0 @@
-GDTEST_OK