You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
GDScript: Allow elements of a parent class in a typed array literal
This commit is contained in:
@@ -116,8 +116,8 @@ func test():
|
||||
assert(duplicated_floats.get_typed_builtin() == TYPE_FLOAT)
|
||||
|
||||
|
||||
var b_objects: Array[B] = [B.new(), null]
|
||||
assert(b_objects.size() == 2)
|
||||
var b_objects: Array[B] = [B.new(), B.new() as A, null]
|
||||
assert(b_objects.size() == 3)
|
||||
assert(b_objects.get_typed_builtin() == TYPE_OBJECT)
|
||||
assert(b_objects.get_typed_script() == B)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user