solidity/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol
Daniel Kirchner 4b9c01752d Test updates.
2022-03-16 15:34:38 +01:00

20 lines
352 B
Solidity

contract C {
uint256 constant LEN = 3;
uint256[LEN] public a;
constructor(uint256[LEN] memory _a) {
a = _a;
}
}
// ====
// compileViaYul: also
// ----
// constructor(): 1, 2, 3 ->
// gas irOptimized: 142640
// gas legacy: 183490
// gas legacyOptimized: 151938
// a(uint256): 0 -> 1
// a(uint256): 1 -> 2
// a(uint256): 2 -> 3