aboutsummaryrefslogtreecommitdiffstats
path: root/docs/types.rst
diff options
context:
space:
mode:
authorNicolás Venturo <nicolas.venturo@gmail.com>2018-07-13 06:58:06 +0800
committerGitHub <noreply@github.com>2018-07-13 06:58:06 +0800
commite3339a9684f69bf61f977052e4658b46f24527e2 (patch)
treedc6b109e5f862daa30705887c20af5639570813e /docs/types.rst
parent1e2a42cfe184642a18727502f79a3ee3c5e45b51 (diff)
downloaddexon-solidity-e3339a9684f69bf61f977052e4658b46f24527e2.tar.gz
dexon-solidity-e3339a9684f69bf61f977052e4658b46f24527e2.tar.zst
dexon-solidity-e3339a9684f69bf61f977052e4658b46f24527e2.zip
Update docs allowed mapping key values
Functions cannot be used as mapping keys (e.g. the following contract does not compile): ``` pragma solidity ^0.4.24; contract Foo { mapping(function (uint) pure returns (uint) => string) a; } ```
Diffstat (limited to 'docs/types.rst')
-rw-r--r--docs/types.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/types.rst b/docs/types.rst
index 16445a34..1641b921 100644
--- a/docs/types.rst
+++ b/docs/types.rst
@@ -846,7 +846,7 @@ Mappings
========
Mapping types are declared as ``mapping(_KeyType => _ValueType)``.
-Here ``_KeyType`` can be almost any type except for a mapping, a dynamically sized array, a contract, an enum and a struct.
+Here ``_KeyType`` can be almost any type except for a mapping, a dynamically sized array, a contract, a function, an enum and a struct.
``_ValueType`` can actually be any type, including mappings.
Mappings can be seen as `hash tables <https://en.wikipedia.org/wiki/Hash_table>`_ which are virtually initialized such that