solidity/test/libsolidity/smtCheckerTests/control_flow/short_circuit_or_need_both.sol
2020-08-14 12:58:27 +02:00

18 lines
261 B
Solidity

pragma experimental SMTChecker;
contract c {
uint x;
function f() internal returns (uint) {
x = x + 1;
return x;
}
function g() public returns (bool) {
x = 0;
bool b = (f() > 1) || (f() > 1);
assert(x == 2);
assert(b);
return b;
}
}
// ----