aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/virtualLookup/modifiers_in_libraries.sol
blob: b033fd0c7649546583b8eded4f0c94a561a915b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
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);
    }
}
// ----