mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
More documentation updates.
This commit is contained in:
parent
9f6fff2120
commit
80199ded79
@ -35,7 +35,7 @@ How to update your code
|
|||||||
|
|
||||||
This section gives detailed instructions on how to update prior code for every breaking change.
|
This section gives detailed instructions on how to update prior code for every breaking change.
|
||||||
|
|
||||||
* Change ``address(f)`` to ``f.address`` for ``f`` being a variable of external function type.
|
* Change ``address(f)`` to ``f.address`` for ``f`` being of external function type.
|
||||||
|
|
||||||
Deprecated Elements
|
Deprecated Elements
|
||||||
===================
|
===================
|
||||||
|
@ -582,9 +582,6 @@ do not have a default.
|
|||||||
|
|
||||||
Conversions:
|
Conversions:
|
||||||
|
|
||||||
A value of external function type can be explicitly converted to ``address``
|
|
||||||
resulting in the address of the contract of the function.
|
|
||||||
|
|
||||||
A function type ``A`` is implicitly convertible to a function type ``B`` if and only if
|
A function type ``A`` is implicitly convertible to a function type ``B`` if and only if
|
||||||
their parameter types are identical, their return types are identical,
|
their parameter types are identical, their return types are identical,
|
||||||
their internal/external property is identical and the state mutability of ``A``
|
their internal/external property is identical and the state mutability of ``A``
|
||||||
@ -616,8 +613,9 @@ just use ``f``, if you want to use its external form, use ``this.f``.
|
|||||||
|
|
||||||
Members:
|
Members:
|
||||||
|
|
||||||
Public (or external) functions have the following members:
|
External (or public) functions have the following members:
|
||||||
|
|
||||||
|
* ``.address`` returns the address of the contract of the function.
|
||||||
* ``.selector`` returns the :ref:`ABI function selector <abi_function_selector>`
|
* ``.selector`` returns the :ref:`ABI function selector <abi_function_selector>`
|
||||||
* ``.gas(uint)`` returns a callable function object which, when called, will send the specified amount of gas to the target function. See :ref:`External Function Calls <external-function-calls>` for more information.
|
* ``.gas(uint)`` returns a callable function object which, when called, will send the specified amount of gas to the target function. See :ref:`External Function Calls <external-function-calls>` for more information.
|
||||||
* ``.value(uint)`` returns a callable function object which, when called, will send the specified amount of wei to the target function. See :ref:`External Function Calls <external-function-calls>` for more information.
|
* ``.value(uint)`` returns a callable function object which, when called, will send the specified amount of wei to the target function. See :ref:`External Function Calls <external-function-calls>` for more information.
|
||||||
@ -629,6 +627,7 @@ Example that shows how to use the members::
|
|||||||
|
|
||||||
contract Example {
|
contract Example {
|
||||||
function f() public payable returns (bytes4) {
|
function f() public payable returns (bytes4) {
|
||||||
|
assert(this.f.address == address(this));
|
||||||
return this.f.selector;
|
return this.f.selector;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user