Assignment to fixed-sized array should be a compile-time error on a length mismatch
For example, assigning a string[3]
to a string[2]
should be a compile-time error.
class Thing {
public string values[2];
construct {
values = new string[3] {
_("foo"),
_("bar"),
_("bazz")
};
stderr.printf ("%s\n", values[2]);
}
}
Instead, the program compiles, and the constructor will print garbage.