solidity/test/libsolidity/semanticTests/array/copying/array_copy_nested_array.sol

21 lines
429 B
Solidity
Raw Normal View History

contract c {
uint256[4][] a;
uint256[10][] b;
uint256[][] c;
function test(uint256[2][] calldata d) external returns (uint256) {
a = d;
b = a;
c = b;
return c[1][1] | c[1][2] | c[1][3] | c[1][4];
}
}
// ====
// compileViaYul: also
// ----
// test(uint256[2][]): 32, 3, 7, 8, 9, 10, 11, 12 -> 10
// gas irOptimized: 610552
2021-02-12 12:45:15 +00:00
// gas legacy: 604268
2021-03-11 11:17:50 +00:00
// gas legacyOptimized: 603688