summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdscript/tests/scripts')
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.gd2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.out2
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.gd6
-rw-r--r--modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.out2
4 files changed, 12 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.gd b/modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.gd
new file mode 100644
index 0000000000..7e1efb8d1b
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.gd
@@ -0,0 +1,2 @@
+func test():
+ Time.new()
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.out b/modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.out
new file mode 100644
index 0000000000..bc4875d908
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Cannot construct native class "Time" because it is an engine singleton.
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.gd b/modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.gd
new file mode 100644
index 0000000000..a46b6d8658
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.gd
@@ -0,0 +1,6 @@
+# GH-82081
+
+extends Time
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.out b/modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.out
new file mode 100644
index 0000000000..7c26dea56e
--- /dev/null
+++ b/modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.out
@@ -0,0 +1,2 @@
+GDTEST_ANALYZER_ERROR
+Cannot inherit native class "Time" because it is an engine singleton.