forked from sascha/godot
Merge pull request #72804 from vnen/gdscript-no-onready-without-node
GDScript: Fix inheritance check of @onready for inner classes4.0
commit
7b86a082be
@ -0,0 +1,7 @@
|
||||
extends Node
|
||||
|
||||
class Inner extends RefCounted:
|
||||
@onready var nope = 0
|
||||
|
||||
func test():
|
||||
print("Cannot use @onready without a Node base")
|
||||
@ -0,0 +1,2 @@
|
||||
GDTEST_ANALYZER_ERROR
|
||||
"@onready" can only be used in classes that inherit "Node".
|
||||
@ -0,0 +1,7 @@
|
||||
extends RefCounted
|
||||
|
||||
func test():
|
||||
print("ok")
|
||||
|
||||
class Inner extends Node:
|
||||
@onready var okay = 0
|
||||
@ -0,0 +1,2 @@
|
||||
GDTEST_OK
|
||||
ok
|
||||
Loading…
Reference in New Issue