18 lines
559 B
GDScript
18 lines
559 B
GDScript
@tool extends EditorScript
|
|
## Test environment for resolving uncertainties about GDScript semantics.
|
|
|
|
func _test1() -> void:
|
|
var foo: Dictionary[String, int] = {&'bar': 1, &'baz/qux:quux': 2}
|
|
var bar := func (baz: Dictionary) -> Dictionary[NodePath, float]:
|
|
@warning_ignore("confusable_local_declaration")
|
|
var qux: Dictionary[NodePath, float] = {}
|
|
for key in baz:
|
|
qux[key as NodePath] = baz[key]
|
|
return qux
|
|
var qux: Dictionary[NodePath, float] = bar.call(foo)
|
|
for key in qux:
|
|
print("%s: %s" % [key, qux[key]])
|
|
|
|
func _run() -> void:
|
|
_test1()
|