diff options
author | Dmitrii Maganov <vonagam@gmail.com> | 2023-02-02 00:23:47 +0200 |
---|---|---|
committer | Dmitrii Maganov <vonagam@gmail.com> | 2023-02-06 22:00:16 +0200 |
commit | 8400308ab30a2a32731d1c50b53f064edc8cf3ee (patch) | |
tree | 1cc2bbddcc935c5bc95dcb5fc0edee66cabc8dda /modules/gdscript/tests | |
parent | 47c3e3b781a0aacc10c589a701a23aaac198663f (diff) |
GDScript: Fix can_reference check for typed arrays
Diffstat (limited to 'modules/gdscript/tests')
-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') |