solidity/test/libsolidity/semanticTests/modifiers/function_modifier_loop.sol
2020-03-19 14:42:25 +01:00

14 lines
218 B
Solidity

contract C {
modifier repeat(uint256 count) {
uint256 i;
for (i = 0; i < count; ++i) _;
}
function f() public repeat(10) returns (uint256 r) {
r += 1;
}
}
// ----
// f() -> 10