solidity/test/libsolidity/smtCheckerTests/operators/conditional_assignment_nested_unsafe.sol
2021-01-04 10:03:16 +01:00

11 lines
342 B
Solidity

pragma experimental SMTChecker;
contract C {
function f(bool b1, bool b2) public pure {
uint c = b1 ? 3 : (b2 ? 2 : 1);
assert(c > 1);
}
}
// ----
// Warning 6328: (141-154): CHC: Assertion violation happens here.\nCounterexample:\n\nb1 = false\nb2 = false\n\n\nTransaction trace:\nC.constructor()\nC.f(false, false)