solidity/test/libsolidity/smtCheckerTests/operators/conditional_assignment_always_true.sol
2020-09-09 16:14:21 +02:00

13 lines
262 B
Solidity

pragma experimental SMTChecker;
contract C {
function f(bool b) public pure {
require(b);
uint c = b ? 5 : 1;
assert(c < 5);
}
}
// ----
// Warning 6328: (118-131): Assertion violation happens here.
// Warning 6838: (105-106): Condition is always true.