I am taking CryptoZombies Solidity tutorial and I have got such a problem:
Type address is not implicitly convertible to expected type address payable.
Here is the code:
function withdraw() external onlyOwner {
address payable _owner = address(uint160(owner()));
_owner.transfer(address(this).balance);
}
I use VSCode and a Solidity extension. The IDE highlights this line in red:
address payable _owner = address(uint160(owner()));
and displays the above error. What should I do to avoid this error?