The following allows a write to an immutable array:
import std.stdio;
void doSomething(const(char)[][] a, const(char)[][] b)
{
a[0]=b[0];
}
void main()
{
string s = "hello";
char[][1] a;
string[1] b;
b[0] = s;
doSomething(a, b);
a[0][1] = 'c'; // OOPS!
writeln(s);
}
So, a conversion to const that is not the top ref should be disallowed.
Comment #1 by leandro.lucarella — 2009-12-16T16:17:10Z