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

22 lines
414 B
Solidity
Raw Normal View History

2019-05-06 16:24:15 +00:00
contract C
{
uint[] a;
function f(bool b) public {
2021-03-23 18:15:14 +00:00
a.push();
a.push();
a.push();
2019-05-06 16:24:15 +00:00
a[2] = 3;
require(b);
if (b)
delete a;
else
delete a[2];
2021-03-23 18:15:14 +00:00
assert(a.length == 0);
2019-05-06 16:24:15 +00:00
}
}
2021-03-31 15:11:54 +00:00
// ====
// SMTEngine: all
2019-05-06 16:24:15 +00:00
// ----
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.
2021-03-31 15:11:54 +00:00
// Warning 6838: (121-122): BMC: Condition is always true.