From 8400308ab30a2a32731d1c50b53f064edc8cf3ee Mon Sep 17 00:00:00 2001 From: Dmitrii Maganov Date: Thu, 2 Feb 2023 00:23:47 +0200 Subject: GDScript: Fix can_reference check for typed arrays --- .../gdscript/tests/scripts/analyzer/features/typed_array_usage.gd | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/gdscript/tests/scripts/analyzer') diff --git a/modules/gdscript/tests/scripts/analyzer/features/typed_array_usage.gd b/modules/gdscript/tests/scripts/analyzer/features/typed_array_usage.gd index e1e6134fd4..092ae49d00 100644 --- a/modules/gdscript/tests/scripts/analyzer/features/typed_array_usage.gd +++ b/modules/gdscript/tests/scripts/analyzer/features/typed_array_usage.gd @@ -201,4 +201,10 @@ func test(): assert(typed_enums.get_typed_builtin() == TYPE_INT) + var a := A.new() + var typed_natives: Array[RefCounted] = [a] + var typed_scripts = Array(typed_natives, TYPE_OBJECT, "RefCounted", A) + assert(typed_scripts[0] == a) + + print('ok') -- cgit v1.2.3