mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Warns if modifier uses msg.value in non-payable function.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
contract C {
|
||||
modifier costs(uint _amount) { require(msg.value >= _amount); _; }
|
||||
function f() costs(1 ether) public payable {}
|
||||
}
|
||||
Reference in New Issue
Block a user