mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
GDScript: Add error when exporting node in non [Node]-derived classes
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
# GH-82809
|
||||
|
||||
extends Resource
|
||||
|
||||
@export var node: Node
|
||||
|
||||
func test():
|
||||
pass
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
Node export is only supported in Node-derived classes, but the current class inherits "Resource".
|
||||
@@ -0,0 +1,9 @@
|
||||
# GH-82809
|
||||
|
||||
extends Node
|
||||
|
||||
class Inner:
|
||||
@export var node: Node
|
||||
|
||||
func test():
|
||||
pass
|
||||
@@ -0,0 +1,2 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
Node export is only supported in Node-derived classes, but the current class inherits "RefCounted".
|
||||
@@ -0,0 +1,8 @@
|
||||
# GH-82809
|
||||
|
||||
extends Resource
|
||||
|
||||
@export var node_array: Array[Node]
|
||||
|
||||
func test():
|
||||
pass
|
||||
@@ -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