Created attachment 1262
repro case
Its no longer possible to access the length of static arrays stored inside
other types from within methods of classes. See attached repro case.
Comment #1 by rswhite4 — 2013-10-13T11:40:29Z
IMO this is correct, because f is not static and belongs to a struct instance.
Or did I miss something?
Comment #2 by code — 2013-10-13T11:46:54Z
The length of f is known at compile time. There is no need for a this pointer to access it. Also it works if you put the same code into a regular function. It stops working inside methods. Additionaly this is a regression. It used to work in dmd 2.060.
Comment #3 by bugzilla — 2013-10-14T15:17:52Z
The repro case:
-----------------------
struct Vec2
{
float f[2];
}
class Bar
{
void func()
{
float[Vec2.f.length] newVal;
}
}
void main(string[] args)
{
(new Bar).func();
}