immutable int[5] x = [1, 2, 3, 4, 5]; // <-- this compiles
immutable int[5] x = [1, 2, 3, 4, 5, 6]; // <-- this does not...
immutable int[5] x = [1, 2, 3, 4]; // <-- this compiles (!!!) excusemewtf?!
I'm sure this is un-changeable, but can we please get a warning for this?
I reeeeeallly want this to be something that doesn't silently slip through the cracks!
It wouldn't be such a problem if we could write int[$] = [1,2,3,4];, but since we can't do that, this is almost certainly a bug at every location.
I just searched through my code for cases of this (I have a lot of tables), and found 3 actual real cases of actual bugs from this. (!)