Update value-types.rst

This commit is contained in:
aathan 2022-04-23 10:55:34 -07:00 committed by Leo Alt
parent cdf48de315
commit ffbb6f159e

View File

@ -210,6 +210,11 @@ an exception to this rule.
declare its type as ``address payable`` to make this requirement visible. Also,
try to make this distinction or conversion as early as possible.
The distinction between ``address`` and ``address payable`` was introduced with version 0.5.0.
Also starting from that version, contracts are not implicitly convertible to the ``address`` type, but can still be explicitly converted to
``address`` or to ``address payable``, if they have a receive or payable fallback function.
Operators:
* ``<=``, ``<``, ``==``, ``!=``, ``>=`` and ``>``
@ -223,9 +228,7 @@ Operators:
or you can use ``address(uint160(uint256(b)))``, which results in ``0x777788889999AaAAbBbbCcccddDdeeeEfFFfCcCc``.
.. note::
The distinction between ``address`` and ``address payable`` was introduced with version 0.5.0.
Also starting from that version, contracts do not derive from the address type, but can still be explicitly converted to
``address`` or to ``address payable``, if they have a receive or payable fallback function.
Mixed-case hexadecimal numbers conforming to `EIP-55 <https://github.com/ethereum/EIPs/blob/master/EIPS/eip-55.md>`_ are automatically treated as literals of the ``address`` type. See :ref:`Address Literals<address_literals>`.
.. _members-of-addresses: