mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12232 from Josel95/docs-address-type
fixed example address payable
This commit is contained in:
commit
735550b734
@ -241,7 +241,7 @@ and to send Ether (in units of wei) to a payable address using the ``transfer``
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
:force:
|
:force:
|
||||||
|
|
||||||
address payable x = address(0x123);
|
address payable x = payable(0x123);
|
||||||
address myAddress = address(this);
|
address myAddress = address(this);
|
||||||
if (x.balance < 10 && myAddress.balance >= 10) x.transfer(10);
|
if (x.balance < 10 && myAddress.balance >= 10) x.transfer(10);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user