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
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
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.