Fix cyclic references in GDScript 2.0
This commit is contained in:
-3
@@ -1,7 +1,4 @@
|
||||
const A := 42
|
||||
|
||||
func test():
|
||||
pass
|
||||
|
||||
func something():
|
||||
return "OK"
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
const Constants = preload("gdscript_to_preload.gd")
|
||||
const Constants = preload("gdscript_to_preload.notest.gd")
|
||||
|
||||
func test():
|
||||
var a := Constants.A
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
const A = preload("preload_cyclic_reference_a.notest.gd")
|
||||
|
||||
func test():
|
||||
A.test_cyclic_reference()
|
||||
+1
@@ -1 +1,2 @@
|
||||
GDTEST_OK
|
||||
godot
|
||||
@@ -0,0 +1,12 @@
|
||||
const B = preload("preload_cyclic_reference_b.notest.gd")
|
||||
|
||||
const WAITING_FOR = "godot"
|
||||
|
||||
static func test_cyclic_reference():
|
||||
B.test_cyclic_reference()
|
||||
|
||||
static func test_cyclic_reference_2():
|
||||
B.test_cyclic_reference_2()
|
||||
|
||||
static func test_cyclic_reference_3():
|
||||
B.test_cyclic_reference_3()
|
||||
@@ -0,0 +1,10 @@
|
||||
const A = preload("preload_cyclic_reference_a.notest.gd")
|
||||
|
||||
static func test_cyclic_reference():
|
||||
A.test_cyclic_reference_2()
|
||||
|
||||
static func test_cyclic_reference_2():
|
||||
A.test_cyclic_reference_3()
|
||||
|
||||
static func test_cyclic_reference_3():
|
||||
print(A.WAITING_FOR)
|
||||
@@ -1,4 +1,4 @@
|
||||
const preloaded : GDScript = preload("gdscript_to_preload.gd")
|
||||
const preloaded : GDScript = preload("gdscript_to_preload.notest.gd")
|
||||
|
||||
func test():
|
||||
var preloaded_instance: preloaded = preloaded.new()
|
||||
|
||||
Reference in New Issue
Block a user