solidity/test/libsolidity/semanticTests/array/fixed_arrays_in_constructors.sol

17 lines
302 B
Solidity
Raw Normal View History

contract Creator {
uint256 public r;
address public ch;
2020-06-23 12:14:24 +00:00
constructor(address[3] memory s, uint256 x) {
r = x;
ch = s[2];
}
}
// ----
// constructor(): 1, 2, 3, 4 ->
// gas irOptimized: 129013
2021-11-15 15:19:33 +00:00
// gas legacy: 176789
// gas legacyOptimized: 129585
// r() -> 4
// ch() -> 3