What's the reason the following code doesn't compile?
struct S {
const(int)[4] data;
this(const(int)[4] d) {
data = d; // this is line 4
}
}
void main() {
S s;
}
Compiler error:
test.d(4): Error: slice this.data[] is not mutable
Shouldn't the assignment be valid in the ctor?
T
--
MSDOS = MicroSoft's Denial Of Service