diff options
author | Raghav Dua <duaraghav8@gmail.com> | 2018-01-24 01:53:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-24 01:53:18 +0800 |
commit | 18539e53530c812790fbb396a5e5ca5806efb6ba (patch) | |
tree | d0f77e063b46e60b2d0ef7607983a92f1e3dae66 /docs | |
parent | 31aaf4336a5856e98475e2f66beb37eae271de90 (diff) | |
download | dexon-solidity-18539e53530c812790fbb396a5e5ca5806efb6ba.tar.gz dexon-solidity-18539e53530c812790fbb396a5e5ca5806efb6ba.tar.zst dexon-solidity-18539e53530c812790fbb396a5e5ca5806efb6ba.zip |
Abstract Contracts: Add note about function type
Diffstat (limited to 'docs')
-rw-r--r-- | docs/contracts.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/contracts.rst b/docs/contracts.rst index 273ea43a..69d47fef 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -1053,6 +1053,19 @@ 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 an abstract function is different from a :ref:`Function Type <function-types>` even though their syntax looks very similar. + +Example of Abstract function (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 ********** |