GDScript: Fix UNSAFE_CAST warning

This commit is contained in:
Danil Alexeev 2023-10-27 11:08:54 +03:00
parent 09946f79bd
commit 6e996a597f
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
22 changed files with 150 additions and 6 deletions

View file

@ -0,0 +1,3 @@
func test():
var integer := 1
print(integer as Array)

View file

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Invalid cast. Cannot convert from "int" to "Array".

View file

@ -0,0 +1,3 @@
func test():
var integer := 1
print(integer as Node)

View file

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Invalid cast. Cannot convert from "int" to "Node".

View file

@ -0,0 +1,3 @@
func test():
var object := RefCounted.new()
print(object as int)

View file

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
Invalid cast. Cannot convert from "RefCounted" to "int".