From f9924928513050a4859ffd1e10c8573de0c2e822 Mon Sep 17 00:00:00 2001 From: tserg <8017125+tserg@users.noreply.github.com> Date: Sat, 17 Dec 2022 23:00:20 +0800 Subject: [PATCH] update base type for arrays (#3199) --- docs/types.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/types.rst b/docs/types.rst index 276a1f3849..3b14990326 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -443,7 +443,7 @@ Fixed-size Lists Fixed-size lists hold a finite number of elements which belong to a specified type. -Lists can be declared with ``_name: _ValueType[_Integer]``. +Lists can be declared with ``_name: _ValueType[_Integer]``, except ``Bytes[N]``, ``String[N]`` and enums. .. code-block:: python @@ -480,7 +480,7 @@ A two dimensional list can be declared with ``_name: _ValueType[inner_size][oute Dynamic Arrays ---------------- -Dynamic arrays represent bounded arrays whose length can be modified at runtime, up to a bound specified in the type. They can be declared with ``_name: DynArray[_Type, _Integer]``, where ``_Type`` can be of value type (except ``Bytes[N]`` and ``String[N]``) or reference type (except mappings). +Dynamic arrays represent bounded arrays whose length can be modified at runtime, up to a bound specified in the type. They can be declared with ``_name: DynArray[_Type, _Integer]``, where ``_Type`` can be of value type or reference type (except mappings). .. code-block:: python @@ -507,7 +507,7 @@ Dynamic arrays represent bounded arrays whose length can be modified at runtime, Attempting to access data past the runtime length of an array, ``pop()`` an empty array or ``append()`` to a full array will result in a runtime ``REVERT``. Attempting to pass an array in calldata which is larger than the array bound will result in a runtime ``REVERT``. .. note:: - To keep code easy to reason about, modifying an array while using it as an iterator it is disallowed by the language. For instance, the following usage is not allowed: + To keep code easy to reason about, modifying an array while using it as an iterator is disallowed by the language. For instance, the following usage is not allowed: .. code-block:: python