summaryrefslogtreecommitdiff
path: root/modules/gdscript/tests/scripts
diff options
context:
space:
mode:
authorDmitrii Maganov <vonagam@gmail.com>2023-02-02 00:23:47 +0200
committerDmitrii Maganov <vonagam@gmail.com>2023-02-06 22:00:16 +0200
commit8400308ab30a2a32731d1c50b53f064edc8cf3ee (patch)
tree1cc2bbddcc935c5bc95dcb5fc0edee66cabc8dda /modules/gdscript/tests/scripts
parent47c3e3b781a0aacc10c589a701a23aaac198663f (diff)
GDScript: Fix can_reference check for typed arrays
Diffstat (limited to 'modules/gdscript/tests/scripts')
-rw-r--r--modules/gdscript/tests/scripts/analyzer/features/typed_array_usage.gd6
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')