Merge pull request #5978 from ethereum/fix-broken-hint

Fix error msg hint for non-payable contracts
This commit is contained in:
chriseth
2019-02-18 11:49:07 +01:00
committed by GitHub
3 changed files with 41 additions and 32 deletions
@@ -0,0 +1,8 @@
contract C {
function f() public {
address(this).send(10);
}
}
// ----
// TypeError: (47-65): "send" and "transfer" are only available for objects of type "address payable", not "address".
@@ -0,0 +1,8 @@
contract C {
function f() public {
address(this).transfer(10);
}
}
// ----
// TypeError: (47-69): "send" and "transfer" are only available for objects of type "address payable", not "address".