Merge pull request #1408 from ethereum/keytype

docs: some types cannot be the key type for mappings
This commit is contained in:
chriseth 2016-11-23 14:54:46 +01:00 committed by GitHub
commit ec2e882376

View File

@ -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