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

16 lines
271 B
Solidity
Raw Normal View History

2020-12-03 15:08:38 +00:00
contract C {
modifier repeat(uint256 count) {
uint256 i;
for (i = 0; i < count; ++i) _;
}
function f() public repeat(10) 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() -> 1