mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Changelog entry.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
library WithModifier {
|
||||
modifier mod() { require(msg.value > 10 ether); _; }
|
||||
function withMod(uint self) mod() internal view { require(self > 0); }
|
||||
}
|
||||
|
||||
contract Test {
|
||||
using WithModifier for *;
|
||||
|
||||
function f(uint _value) public payable {
|
||||
_value.withMod();
|
||||
WithModifier.withMod(_value);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
Reference in New Issue
Block a user