solidity/test/libsolidity/semanticTests/array/constant_var_as_array_length.sol
2020-03-19 14:42:25 +01:00

15 lines
248 B
Solidity

contract C {
uint256 constant LEN = 3;
uint256[LEN] public a;
constructor(uint256[LEN] memory _a) public {
a = _a;
}
}
// ----
// constructor(): 1, 2, 3 ->
// a(uint256): 0 -> 1
// a(uint256): 1 -> 2
// a(uint256): 2 -> 3