Why can't I initialize storage arrays when declaring them rather than initializing them in function or constructor?
example: this does not work, it amounts to [0, 0, 0, 0]
contract Example {
uint256[4] array = [1, 2, 3, 4];
...
constructor () {}
}
this does work
contract Example {
uint256[4] array;
...
constructor () {
array[0] = [1];
array[1] = [2];
...
}
}