diff options
author | Antonio Tenorio-Fornés <antoniotenorio@ucm.es> | 2017-07-25 00:30:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-25 00:30:54 +0800 |
commit | db739dff69e0d117145c7abbe2c40ce087bbd961 (patch) | |
tree | c8e9cb709cf26c8a745df8a94c4d6346b553f868 /docs | |
parent | cfb11ff7ec75865aba6323f443ce7055cca7b542 (diff) | |
download | dexon-solidity-db739dff69e0d117145c7abbe2c40ce087bbd961.tar.gz dexon-solidity-db739dff69e0d117145c7abbe2c40ce087bbd961.tar.zst dexon-solidity-db739dff69e0d117145c7abbe2c40ce087bbd961.zip |
Change Mapping example to valid (executable) code
Current example will not compile and would need to be compiled in separate files, unlike how it is shown (see https://github.com/ethereum/solidity/pull/2618).
The proposed changes provide both a source code that compiles and a easier to understand Contract creation (using new instead of a contract address).
Diffstat (limited to 'docs')
-rw-r--r-- | docs/types.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/types.rst b/docs/types.rst index b9ecd083..adac16e7 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -815,9 +815,10 @@ for each ``_KeyType``, recursively. } contract MappingUser { - address contractAddress = 0x42; function f() returns (uint) { - return MappingExample(contractAddress).balances(this); + MappingExample m = new MappingExample(); + m.update(100); + return m.balances(this); } } |