Merge pull request #3427 from duaraghav8/patch-3

Abstract Contracts: Add note about function type
This commit is contained in:
chriseth 2018-02-21 18:04:35 +01:00 committed by GitHub
commit 20d8254029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
**********