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

16 lines
285 B
Solidity
Raw Normal View History

2019-05-06 16:24:15 +00:00
pragma experimental SMTChecker;
contract C
{
uint[][] a;
function f() public {
require(a[2][3] == 4);
delete a;
// Fails as false positive.
// setZeroValue needs forall for arrays.
assert(a[2][3] == 0);
}
}
// ----
// Warning: (194-214): Assertion violation happens here