mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #5978 from ethereum/fix-broken-hint
Fix error msg hint for non-payable contracts
This commit is contained in:
@@ -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".
|
||||
Reference in New Issue
Block a user