Skip to content

Commit 6de6560

Browse files
authored
Merge pull request #11238 from Calinou/array-dictionary-assignment-operator
Clarify assignment operator in typed array/dictionary documentation
2 parents 74f73e3 + 0b03cc7 commit 6de6560

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tutorials/scripting/gdscript/static_typing.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,11 @@ Specify the element type of an ``Array``
218218
To define the type of an ``Array``, enclose the type name in ``[]``.
219219

220220
An array's type applies to ``for`` loop variables, as well as some operators like
221-
``[]``, ``[]=``, and ``+``. Array methods (such as ``push_back``) and other operators
222-
(such as ``==``) are still untyped. Built-in types, native and custom classes,
223-
and enums may be used as element types. Nested array types
224-
(like ``Array[Array[int]]``) are not supported.
221+
``[]``, ``[...] =`` (assignment), and ``+``. Array methods
222+
(such as ``push_back``) and other operators (such as ``==``)
223+
are still untyped. Built-in types, native and custom classes,
224+
and enums may be used as element types. Nested array types (like ``Array[Array[int]]``)
225+
are not supported.
225226

226227

227228
::
@@ -259,9 +260,9 @@ To define the type of a ``Dictionary``'s keys and values, enclose the type name
259260
and separate the key and value type with a comma.
260261

261262
A dictionary's value type applies to ``for`` loop variables, as well as some operators like
262-
``[]`` and ``[]=``. Dictionary methods that return values and other operators
263-
(such as ``==``) are still untyped. Built-in types, native and custom classes,
264-
and enums may be used as element types. Nested typed collections
263+
``[]`` and ``[...] =`` (assignment). Dictionary methods that return values
264+
and other operators (such as ``==``) are still untyped. Built-in types, native
265+
and custom classes, and enums may be used as element types. Nested typed collections
265266
(like ``Dictionary[String, Dictionary[String, int]]``) are not supported.
266267

267268

0 commit comments

Comments
 (0)