aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-02-22 01:04:35 +0800
committerGitHub <noreply@github.com>2018-02-22 01:04:35 +0800
commit20d8254029c2282ea3603433d94fe9018a4a69af (patch)
tree6eff253684fe81228750cafb751eca2239cb7641 /docs
parent98324d6c89a87cbdc3154e3059c69a292d6ffe41 (diff)
parent09887de266665c1233cd2aa853e8271e6af282db (diff)
downloaddexon-solidity-20d8254029c2282ea3603433d94fe9018a4a69af.tar.gz
dexon-solidity-20d8254029c2282ea3603433d94fe9018a4a69af.tar.zst
dexon-solidity-20d8254029c2282ea3603433d94fe9018a4a69af.zip
Merge pull request #3427 from duaraghav8/patch-3
Abstract Contracts: Add note about function type
Diffstat (limited to 'docs')
-rw-r--r--docs/contracts.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst
index afc32b16..368b7819 100644
--- a/docs/contracts.rst
+++ b/docs/contracts.rst
@@ -1053,6 +1053,17 @@ but they can be used as base contracts::
If a contract inherits from an abstract contract and does not implement all non-implemented functions by overriding, it will itself be abstract.
+Note that a function without implementation is different from a :ref:`Function Type <function_types>` even though their syntax looks very similar.
+
+Example of function without implementation (a function declaration)::
+
+ function foo(address) external returns (address);
+
+Example of a Function Type (a variable declaration, where the variable is of type ``function``)::
+
+ function(address) external returns (address) foo;
+
+
.. index:: ! contract;interface, ! interface contract
**********