1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

GDScript: Prevent constructing and inheriting engine singletons

This commit is contained in:
Danil Alexeev
2023-09-22 10:10:22 +03:00
parent fe5b1c8d49
commit 10b00bc2ea
5 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
func test():
Time.new()

View File

@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Cannot construct native class "Time" because it is an engine singleton.

View File

@@ -0,0 +1,6 @@
# GH-82081
extends Time
func test():
pass

View File

@@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Cannot inherit native class "Time" because it is an engine singleton.