kenji hara:

I've posted two pull requests for the purpose.

This is something related. Are your recent patches allowing code like this, that are two common needs?


void main() {
    auto a1 = [1, 2];
    auto a2 = [3, 4];
    immutable a3 = a1 ~ a2; // line 4
    immutable a4 = [10, 20];
    immutable a5 = [100];
    int[] a6 = a4 ~ a5; // line 7
}


test.d(4): Error: cannot implicitly convert expression (a1 ~ a2) of type int[] to immutable(int[]) test.d(7): Error: cannot implicitly convert expression (a4 ~ a5) of type immutable(int)[] to int[]

Bye,
bearophile

Reply via email to