solidity/test/libsolidity/semanticTests/array/array_2d_new.sol
2022-11-10 22:21:15 +01:00

11 lines
216 B
Solidity

contract C {
function f(uint n) public pure returns (uint) {
uint[][] memory a = new uint[][](2);
for (uint i = 0; i < 2; ++i)
a[i] = new uint[](3);
return a[0][0] = n;
}
}
// ----
// f(uint256): 42 -> 42