summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts
diff options
context:
space:
mode:
authorDmitrii Maganov <vonagam@gmail.com>2023-03-08 22:06:29 +0200
committerDmitrii Maganov <vonagam@gmail.com>2023-03-13 01:40:13 +0200
commit4e34cf238aeff209f5823685d7b66ae8d66118cb (patch)
treef1baec0d9450fc2c550f2a8ad9c9a8012802d9d6 /modules/gdscript/tests/scripts
parent550a7798510810d238b733a54f69da71b2a2d152 (diff)
downloadredot-engine-4e34cf238aeff209f5823685d7b66ae8d66118cb.tar.gz
GDScript: Change parser representation of class extends
Diffstat (limited to 'modules/gdscript/tests/scripts')
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.gd5
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.gd8
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.out2
4 files changed, 17 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.gd b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.gd
new file mode 100644
index 0000000000..54cf4d89ec
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.gd
@@ -0,0 +1,5 @@
+class Foo extends RefCounted.Bar:
+ pass
+
+func test():
+ print('not ok')
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.out b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.out
new file mode 100644
index 0000000000..386d6261c6
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Cannot get nested types for extension from non-GDScript type "RefCounted".
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.gd b/modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.gd
new file mode 100644
index 0000000000..0f7d584edb
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.gd
@@ -0,0 +1,8 @@
+class Foo:
+ pass
+
+class Bar extends Foo.Baz:
+ pass
+
+func test():
+ print('not ok')
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.out b/modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.out
new file mode 100644
index 0000000000..42873056f2
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Could not find nested type "Baz".