solidity/test/libsolidity/semanticTests/modifiers/function_modifier_multi_invocation_viair.sol

17 lines
289 B
Solidity
Raw Normal View History

2020-12-03 15:08:38 +00:00
contract C {
modifier repeat(bool twice) {
if (twice) _;
_;
}
function f(bool twice) public repeat(twice) returns (uint256 r) {
r += 1;
}
}
// ====
// compileViaYul: true
2021-04-23 15:59:01 +00:00
// compileToEwasm: also
2020-12-03 15:08:38 +00:00
// ----
// f(bool): false -> 1
// f(bool): true -> 1