solidity/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol
2021-11-15 16:32:45 +01:00

19 lines
333 B
Solidity

contract Creator {
uint256 public r;
address public ch;
constructor(address[3] memory s, uint256 x) {
r = x;
ch = s[2];
}
}
// ====
// compileViaYul: also
// ----
// constructor(): 1, 2, 3, 4 ->
// gas irOptimized: 132278
// gas legacy: 176789
// gas legacyOptimized: 129585
// r() -> 4
// ch() -> 3