diff options
author | Dmitrii Maganov <vonagam@gmail.com> | 2022-11-27 09:56:53 +0200 |
---|---|---|
committer | Dmitrii Maganov <vonagam@gmail.com> | 2023-01-31 11:54:41 +0200 |
commit | 5909f9f07547895de24fb6965d44c859b69a54a2 (patch) | |
tree | 127f149411e46727b62f921b6951e4d8cd267c6b /modules/gdscript/tests/scripts/runtime/features | |
parent | e9de988020f3d46c3e7b4fd5a8a80724996035e0 (diff) |
GDScript: Fix issues with 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 |