From 80199ded793a9c6ed146a179967594cfa15ab86f Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Thu, 15 Aug 2019 13:57:04 +0200 Subject: [PATCH] More documentation updates. --- docs/060-breaking-changes.rst | 2 +- docs/types/value-types.rst | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/060-breaking-changes.rst b/docs/060-breaking-changes.rst index dacd85b16..c6dd41124 100644 --- a/docs/060-breaking-changes.rst +++ b/docs/060-breaking-changes.rst @@ -35,7 +35,7 @@ How to update your code 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 =================== diff --git a/docs/types/value-types.rst b/docs/types/value-types.rst index 0b9d6ad90..5f7337aaf 100644 --- a/docs/types/value-types.rst +++ b/docs/types/value-types.rst @@ -582,9 +582,6 @@ do not have a default. 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 their parameter types are identical, their return types are identical, 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: -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 ` * ``.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 ` 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 ` for more information. @@ -629,6 +627,7 @@ Example that shows how to use the members:: contract Example { function f() public payable returns (bytes4) { + assert(this.f.address == address(this)); return this.f.selector; }