Ali Çehreli:

I am confused. Even if the right-hand expression were a fixed-length array? If so, then we wouldn't speak of their being value types. (?)

    a = b;    // should be fine

Otherwise, fixed-length arrays would become weird types that cannot be used in assignment operations.

I just read the change log. Either it is incorrect or the change is implemented inccorrectly because it is supposed to be about the right-hand side. So, OP's code is correct after all.

Sorry, my mistake, I have confused the two things a bit, regarding the position of the [].

Currently this code gives no warnings:

void main() {
    int[3] a, b;
    a = b;
}

This topic is discussed a little in Issue 7444.

Bye,
bearophile

Reply via email to