solidity/test/libsolidity/smtCheckerTests/array_members/push_2d_arg_1_unsafe.sol

15 lines
341 B
Solidity
Raw Normal View History

2020-05-17 18:20:17 +00:00
pragma experimental SMTChecker;
contract C {
uint[][] a;
function f(uint[] memory x, uint y) public {
a.push(x);
a[0].push(y);
2020-05-17 21:21:08 +00:00
a[0].pop();
2020-05-17 18:20:17 +00:00
assert(a[0][a[0].length - 1] == y);
}
}
2020-05-18 14:33:27 +00:00
// ----
2020-07-13 18:48:00 +00:00
// Warning 6328: (150-184): Assertion violation happens here
// Warning 4144: (162-177): Underflow (resulting value less than 0) happens here