Merge pull request #75419 from vonagam/fix-super-classes-in-array-literals

GDScript: Allow elements of a parent class in a typed array literal
This commit is contained in:
Rémi Verschelde 2023-06-14 09:23:32 +02:00
commit 8b62c52d1c
No known key found for this signature in database
GPG key ID: C3336907360768E1
4 changed files with 20 additions and 2 deletions

View file

@ -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)