diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-31 11:04:21 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-31 11:04:21 +0100 |
commit | 99a44f846975a87f7dc2f121818c9570b0457b96 (patch) | |
tree | 0562814c260f3f73c4cddd18f2cb6a18262b1f20 /modules/gdscript/tests/scripts/runtime/features | |
parent | 97de7f39e19ed3658073a6bb626bcafb33039a17 (diff) | |
parent | 5909f9f07547895de24fb6965d44c859b69a54a2 (diff) |
Merge pull request #69248 from vonagam/fixing-typed-arrays
GDScript: Fix typed arrays
Diffstat (limited to 'modules/gdscript/tests/scripts/runtime/features')
2 files changed, 8 insertions, 0 deletions
diff --git a/modules/gdscript/tests/scripts/runtime/features/typed_array_init_with_untyped_in_literal.gd b/modules/gdscript/tests/scripts/runtime/features/typed_array_init_with_untyped_in_literal.gd new file mode 100644 index 0000000000..ec444b4ffa --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/typed_array_init_with_untyped_in_literal.gd @@ -0,0 +1,6 @@ +func test(): + var untyped: Variant = 32 + var typed: Array[int] = [untyped] + assert(typed.get_typed_builtin() == TYPE_INT) + assert(str(typed) == '[32]') + print('ok') diff --git a/modules/gdscript/tests/scripts/runtime/features/typed_array_init_with_untyped_in_literal.out b/modules/gdscript/tests/scripts/runtime/features/typed_array_init_with_untyped_in_literal.out new file mode 100644 index 0000000000..1b47ed10dc --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/typed_array_init_with_untyped_in_literal.out @@ -0,0 +1,2 @@ +GDTEST_OK +ok |