GDScript: Add error when exporting node in non [Node]-derived classes
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
# GH-82809
|
||||
|
||||
extends Resource
|
||||
|
||||
@export var node: Node
|
||||
|
||||
func test():
|
||||
pass
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
Node export is only supported in Node-derived classes, but the current class inherits "Resource".
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
# GH-82809
|
||||
|
||||
extends Node
|
||||
|
||||
class Inner:
|
||||
@export var node: Node
|
||||
|
||||
func test():
|
||||
pass
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
Node export is only supported in Node-derived classes, but the current class inherits "RefCounted".
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
# GH-82809
|
||||
|
||||
extends Resource
|
||||
|
||||
@export var node_array: Array[Node]
|
||||
|
||||
func test():
|
||||
pass
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
Node export is only supported in Node-derived classes, but the current class inherits "Resource".
|
||||
Reference in New Issue
Block a user