Skip to content

Commit e4d3425

Browse files
CJ42cameel
authored andcommitted
docs: add uint160 type in address conversion section
docs: add notice for uint conversion before 0.8.0 docs: edit sentence structure + remove 'result in `address payable`' docs: add keyword 'explicitly' to be more specific for `address payable` docs: edit notice uint to address conversion change since 0.8.0 Co-authored-by: Kamil Śliwak <[email protected]>
1 parent 48669b4 commit e4d3425

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/types/conversion.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ Addresses
188188
As described in :ref:`address_literals`, hex literals of the correct size that pass the checksum
189189
test are of ``address`` type. No other literals can be implicitly converted to the ``address`` type.
190190

191-
Explicit conversions from ``bytes20`` or any integer type to ``address`` result in ``address payable``.
191+
Explicit conversions to ``address`` are allowed only from ``bytes20`` and ``uint160``.
192192

193-
An ``address a`` can be converted to ``address payable`` via ``payable(a)``.
193+
An ``address a`` can be converted explicitly to ``address payable`` via ``payable(a)``.
194+
195+
.. note::
196+
Prior to version 0.8.0, it was possible to explicitly convert from any integer type (of any size, signed or unsigned) to ``address`` or ``address payable``.
197+
Starting with in 0.8.0 only conversion from ``uint160`` is allowed.

0 commit comments

Comments
 (0)