solidity/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol
Daniel Kirchner 44da8507b1 Change default EVM version to Shanghai.
Co-authored-by: Rodrigo Q. Saramago <rodrigoqsaramago@gmail.com>
2023-05-08 16:34:23 +02:00

17 lines
302 B
Solidity

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