diff options
author | Yuri Sizov <11782833+YuriSizov@users.noreply.github.com> | 2023-02-06 23:32:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-06 23:32:47 +0300 |
commit | 945207885b3cd97012215334e56fcd3139d25e9f (patch) | |
tree | e7338a4c7cecfada472d481fb244346a2fcbccd8 /modules/gdscript | |
parent | c0edea37efeb4602d598e96617befe8f0938f798 (diff) | |
parent | 8400308ab30a2a32731d1c50b53f064edc8cf3ee (diff) |
Merge pull request #72546 from vonagam/fix-typed-array-can-reference
GDScript: Fix can_reference check for typed arrays
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/tests/scripts/analyzer/features/typed_array_usage.gd | 6 |
1 files changed, 6 insertions, 0 deletions
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') |