GDScript: Fix inheritance check of @onready for inner classes

This commit is contained in:
George Marques 2023-02-06 14:52:13 -03:00
parent eee343210d
commit ed5ddab7e5
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D
5 changed files with 19 additions and 1 deletions

View file

@ -0,0 +1,7 @@
extends Node
class Inner extends RefCounted:
@onready var nope = 0
func test():
print("Cannot use @onready without a Node base")

View file

@ -0,0 +1,2 @@
GDTEST_ANALYZER_ERROR
"@onready" can only be used in classes that inherit "Node".