solidity/test/libsolidity/smtCheckerTests/control_flow/short_circuit_or_touched.sol

20 lines
511 B
Solidity
Raw Normal View History

2019-05-03 04:15:00 +00:00
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.