digitalmars.D.bugs - resizing static array in struct
- Carlos Santander B. (17/18) Jul 25 2004 The message produced by this code is rather cryptic:
The message produced by this code is rather cryptic:
/////////////////////////
struct A
{
int [10] arr; //line 3
}
void main ()
{
A a;
a.arr.length = 20; //line 9
}
/////////////////////////
dmd test.d
test.d(3): *(#a + 0).length is not an lvalue
However the error is gone if line 9 is removed.
The same happens if A is a union, but not if it's a class.
-----------------------
Carlos Santander Bernal
Jul 25 2004








"Carlos Santander B." <carlos8294 msn.com>