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

15 lines
390 B
Solidity
Raw Permalink Normal View History

// Positive branch touches variable a, but assertion should still hold.
contract C {
function f(uint x) public pure {
uint a = 3;
if (x > 10) {
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: 1 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.