solidity/test/cmdlineTests/optimizer_inliner_inc/input.sol
2021-02-09 19:08:58 +01:00

18 lines
280 B
Solidity

// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0;
function unsafe_inc(uint x) pure returns (uint)
{
unchecked {
return x + 1;
}
}
contract C {
function f() public pure {
for(uint x = 0; x < 10; x = unsafe_inc(x))
{
}
}
}