solidity/test/libsolidity/smtCheckerTests/control_flow/short_circuit_or_touched.sol
2019-05-06 11:04:43 +02:00

20 lines
511 B
Solidity

pragma experimental SMTChecker;
contract C
{
bool b;
function f() public {
if ((b = true) || (b == false)) {}
if ((b == true) || (b = false)) {}
if ((b = true) || (b = false)) {}
if ((b == true) || (b == false)) {}
if ((b = false) || b) {}
}
}
// ----
// Warning: (84-110): Condition is always true.
// Warning: (121-147): Condition is always true.
// Warning: (158-183): Condition is always true.
// Warning: (194-221): Condition is always true.
// Warning: (232-248): Condition is always false.