From 281c8c75d321570c0f47e68171260cadf8c5a817 Mon Sep 17 00:00:00 2001 From: Dmitrii Maganov Date: Sat, 25 Feb 2023 10:53:36 +0200 Subject: GDScript: Fix conversions from native members accessed by identifier --- .../runtime/features/conversions_from_native_members.gd | 11 +++++++++++ .../runtime/features/conversions_from_native_members.out | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.gd create mode 100644 modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.out (limited to 'modules/gdscript/tests') diff --git a/modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.gd b/modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.gd new file mode 100644 index 0000000000..a778fb1a94 --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.gd @@ -0,0 +1,11 @@ +class Foo extends Node: + func _init(): + name = 'f' + var string: String = name + assert(typeof(string) == TYPE_STRING) + assert(string == 'f') + print('ok') + +func test(): + var foo := Foo.new() + foo.free() diff --git a/modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.out b/modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.out new file mode 100644 index 0000000000..1b47ed10dc --- /dev/null +++ b/modules/gdscript/tests/scripts/runtime/features/conversions_from_native_members.out @@ -0,0 +1,2 @@ +GDTEST_OK +ok -- cgit v1.2.3