This code gives an unclear error message:
//----------------
struct A
{
int [10] arr;
}
void main ()
{
A a;
a.arr.length = 20;
}
//----------------
$ gdmd test.d
test.d:9: Error: constant (*(&(a) + 0)).length is not an lvalue
//----------------
Comment #1 by bugs-d — 2009-03-30T00:42:22Z
In DMD 1.041 and 2.026, the error message is now:
name.d(9): Error: constant a.arr.length is not an lvalue
Which is a must clearer, and more correct, error message.
-[Unknown]