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

15 lines
249 B
Solidity
Raw Normal View History

contract C {
modifier repeat(uint256 count) {
uint256 i;
for (i = 0; i < count; ++i) _;
}
function f() public repeat(10) returns (uint256 r) {
r += 1;
}
}
2020-12-03 15:08:38 +00:00
// ====
// compileViaYul: false
// ----
// f() -> 10