aboutsummaryrefslogtreecommitdiffstats
path: root/docs/types.rst
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-07-11 06:07:27 +0800
committerchriseth <chris@ethereum.org>2017-07-14 03:47:29 +0800
commit41e5b2c3c2a84f395da03bfd4cf5bf8586f9df3f (patch)
tree8b8e9eb1136a3705c2e6b9bff04ba1243832db31 /docs/types.rst
parentb2fcd59ee6941de4a392b89295c734385d6019e3 (diff)
downloaddexon-solidity-41e5b2c3c2a84f395da03bfd4cf5bf8586f9df3f.tar.gz
dexon-solidity-41e5b2c3c2a84f395da03bfd4cf5bf8586f9df3f.tar.zst
dexon-solidity-41e5b2c3c2a84f395da03bfd4cf5bf8586f9df3f.zip
Fix bugs in example contracts
Diffstat (limited to 'docs/types.rst')
-rw-r--r--docs/types.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/types.rst b/docs/types.rst
index 67549499..b9ecd083 100644
--- a/docs/types.rst
+++ b/docs/types.rst
@@ -376,7 +376,7 @@ Example that shows how to use internal function types::
function (uint, uint) returns (uint) f
)
internal
- returns (uint)
+ returns (uint r)
{
r = self[0];
for (uint i = 1; i < self.length; i++) {
@@ -599,6 +599,8 @@ possible:
::
+ // This will not compile.
+
pragma solidity ^0.4.0;
contract C {
@@ -606,6 +608,7 @@ possible:
// The next line creates a type error because uint[3] memory
// cannot be converted to uint[] memory.
uint[] x = [uint(1), 3, 4];
+ }
}
It is planned to remove this restriction in the future but currently creates
@@ -812,8 +815,9 @@ for each ``_KeyType``, recursively.
}
contract MappingUser {
+ address contractAddress = 0x42;
function f() returns (uint) {
- return MappingExample(<address>).balances(this);
+ return MappingExample(contractAddress).balances(this);
}
}