You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/types/conversion.rst
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -188,6 +188,10 @@ Addresses
188
188
As described in :ref:`address_literals`, hex literals of the correct size that pass the checksum
189
189
test are of ``address`` type. No other literals can be implicitly converted to the ``address`` type.
190
190
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``.
192
192
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