solidity/test/libsolidity/syntaxTests/controlFlow/localStorageVariables/modifier_declaration_fine.sol
2022-01-06 12:52:06 +01:00

21 lines
366 B
Solidity

contract C {
modifier alwaysRevert() {
_;
revert();
}
modifier ifFlag(bool flag) {
if (flag)
_;
}
struct S { uint a; }
S s;
function f(bool flag) alwaysRevert() internal view {
if (flag) s;
}
function g(bool flag) alwaysRevert() ifFlag(flag) internal view {
s;
}
}
// ----