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

17 lines
419 B
Solidity
Raw Normal View History

// Variable is not merged, if it is only read.
contract C {
function f(uint x) public pure {
uint a = 3;
if (x > 10) {
assert(a == 3);
} else {
assert(a == 3);
}
assert(a == 3);
}
}
2021-03-31 15:11:54 +00:00
// ====
// SMTEngine: all
// ----
2023-02-09 16:07:13 +00:00
// Info 1391: CHC: 3 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.