solidity/test/cmdlineTests/model_checker_targets_constant_condition_chc/input.sol

14 lines
246 B
Solidity

pragma solidity >=0.0;
pragma experimental SMTChecker;
contract test {
uint[] arr;
function f(address payable a, uint x) public {
require(x >= 0);
--x;
x + type(uint).max;
2 / x;
a.transfer(x);
assert(x > 0);
arr.pop();
}
}