GDScript: Fix UNSAFE_CAST warning
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
func test():
|
||||
var integer := 1
|
||||
print(integer as Array)
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
Invalid cast. Cannot convert from "int" to "Array".
|
||||
@@ -0,0 +1,3 @@
|
||||
func test():
|
||||
var integer := 1
|
||||
print(integer as Node)
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
Invalid cast. Cannot convert from "int" to "Node".
|
||||
@@ -0,0 +1,3 @@
|
||||
func test():
|
||||
var object := RefCounted.new()
|
||||
print(object as int)
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
Invalid cast. Cannot convert from "RefCounted" to "int".
|
||||
Reference in New Issue
Block a user