solidity/test/libsolidity/smtCheckerTests/operators/conditional_assignment_nested_unsafe.sol

11 lines
340 B
Solidity
Raw Normal View History

contract C {
function f(bool b1, bool b2) public pure {
uint c = b1 ? 3 : (b2 ? 2 : 1);
assert(c > 1);
}
}
2021-03-31 15:11:54 +00:00
// ====
// SMTEngine: all
// ----
2021-03-31 15:11:54 +00:00
// Warning 6328: (108-121): CHC: Assertion violation happens here.\nCounterexample:\n\nb1 = false\nb2 = false\nc = 1\n\nTransaction trace:\nC.constructor()\nC.f(false, false)