solidity/test/libsolidity/smtCheckerTests/operators/delete_array_index_2d.sol
2023-03-09 14:59:32 +01:00

32 lines
667 B
Solidity

contract C
{
uint[][] a;
constructor() {
init();
}
function init() internal {
a.push();
a.push();
a[0].push();
a[1].push();
}
function f(bool b) public {
// Removed due to Spacer's nondeterminism.
//a[1][1] = 512;
if (b)
delete a;
else
delete a[1];
init();
assert(a[1][0] == 0);
assert(a[0][0] == 0);
}
}
// ====
// SMTEngine: all
// SMTIgnoreCex: yes
// ----
// Warning 6328: (315-335): CHC: Assertion violation might happen here.
// Info 1391: CHC: 8 verification condition(s) proved safe! Enable the model checker option "show proved safe" to see all of them.
// Warning 4661: (315-335): BMC: Assertion violation happens here.