mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
docs: Clarify which functions can be assigned to function variables
This commit is contained in:
parent
36f769662b
commit
67dea6c4f1
@ -663,6 +663,16 @@ Note that public functions of the current contract can be used both as an
|
||||
internal and as an external function. To use ``f`` as an internal function,
|
||||
just use ``f``, if you want to use its external form, use ``this.f``.
|
||||
|
||||
A function of an internal type can be assigned to a variable of an internal function type regardless
|
||||
of where it is defined.
|
||||
This includes private, internal and public functions of both contracts and libraries as well as free
|
||||
functions.
|
||||
External function types, on the other hand, are only compatible with public and external contract
|
||||
functions.
|
||||
Libraries are excluded because they require a ``delegatecall`` and use :ref:`a different ABI
|
||||
convention for their selectors <library-selectors>`.
|
||||
Functions declared in interfaces do not have definitions so pointing at them does not make sense either.
|
||||
|
||||
Members:
|
||||
|
||||
External (or public) functions have the following members:
|
||||
|
Loading…
Reference in New Issue
Block a user