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

24 lines
313 B
Solidity
Raw Normal View History

2019-05-06 16:24:15 +00:00
contract C
{
uint[] a;
2021-03-23 18:15:14 +00:00
constructor() {
a.push();
a.push();
a.push();
a.push();
}
2019-05-06 16:24:15 +00:00
function f(bool b) public {
a[2] = 3;
require(!b);
if (b)
delete a;
else
delete a[2];
assert(a[2] == 0);
}
}
2021-03-31 15:11:54 +00:00
// ====
// SMTEngine: all
2019-05-06 16:24:15 +00:00
// ----
2021-03-31 15:11:54 +00:00
// Warning 6838: (154-155): BMC: Condition is always false.