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

21 lines
366 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[2].push();
a[2].push();
a[2].push();
a[2].push();
}
2019-05-06 16:24:15 +00:00
function f() public {
require(a[2][3] == 4);
delete a;
assert(a[2][3] == 0);
}
}
2021-03-31 15:11:54 +00:00
// ====
// SMTEngine: all
// ----
2021-10-06 09:53:03 +00:00
// Info 1180: Contract invariant(s) for :C:\n(true && !(a.length <= 2))\n(true && !(a[2].length <= 3))\n