solidity/test/libsolidity/smtCheckerTests/array_members/push_2d.sol
2020-05-18 16:35:56 +02:00

14 lines
278 B
Solidity

pragma experimental SMTChecker;
contract C {
uint[][] a;
function f(uint[] memory x, uint y) public {
require(a.length < 100000);
a.push(x);
assert(a[a.length - 1][0] == x[0]);
require(a[0].length < 100000);
a[0].push(y);
assert(a[0][a[0].length - 1] == y);
}
}