This is rejected, but should be accepted:
----
void main()
{
string s = [1, 2, 3];
auto v = new void[3];
v[] = s[]; /* Error: cannot implicitly convert expression (s[]) of type string to void[] */
}
----
It's accepted with an intermediate step:
----
void main()
{
string s = [1, 2, 3];
auto v = new void[3];
immutable(void)[] intermediate = s;
v[] = intermediate[];
}
----
Comment #1 by robert.schadek — 2024-12-13T18:47:34Z