solidity/test/libsolidity/syntaxTests/virtualLookup/modifiers_in_libraries.sol

15 lines
330 B
Solidity
Raw Normal View History

2018-03-13 15:50:27 +00:00
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);
}
}
// ----