mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1408 from ethereum/keytype
docs: some types cannot be the key type for mappings
This commit is contained in:
commit
ec2e882376
@ -739,9 +739,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
|
||||||
|
Loading…
Reference in New Issue
Block a user