I am interested in declaring an array data type and declaring it as a constant.
However, I get the compiler error: “Only constants of value type and byte array type are implemented”.
Example:
Valid:
uint[7] public myArray = [400, 250, 135, 110, 55, 25, 20];
Not valid:
uint[7] public constant myArray = [400, 250, 135, 110, 55, 25, 20];
I understand that this may seem pedantic to want to have in Solidity, however, I want to be absolutely sure that this array is immutable. Currently this is not possible.