docs: some types cannot be the key type for mappings

This commit is contained in:
Yoichi Hirai 2016-11-21 12:47:40 +01:00
parent aa48008cc7
commit b24f4a4d00
No known key found for this signature in database
GPG Key ID: E7B75D080FCF7992

View File

@ -729,9 +729,9 @@ assigning it to a local variable, as in
Mappings Mappings
======== ========
Mapping types are declared as ``mapping _KeyType => _ValueType``, where Mapping types are declared as ``mapping _KeyType => _ValueType``.
``_KeyType`` can be almost any type except for a mapping and ``_ValueType`` Here ``_KeyType`` can be almost any type except for a mapping, a dynamically sized array, a contract, an enum and a struct.
can actually be any type, including mappings. ``_ValueType`` can actually be any type, including mappings.
Mappings can be seen as hashtables which are virtually initialized such that Mappings can be seen as hashtables which are virtually initialized such that
every possible key exists and is mapped to a value whose byte-representation is every possible key exists and is mapped to a value whose byte-representation is