I'm working with solidity tutorial and the instructor write some code to send(withdraw) ether from the contract to address. but it's not working for me.it's shows an error like this
TypeError: Type address is not implicitly convertible to expected type address payable.
--> sendingmoney.sol:15:9:
|
15 | address payable to = msg.sender;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is the code I wrote. The error is in line 15. Please help
Best Answer
Try this way:
Since last Solidity breaking changes they changed how you define payable addresses syntaxis.