D - Static field in static struct using initializer: assertion failure
Got another bug to report:
if a static field is used in a static declared struct, and the static
initializer syntax is used on that field, an assert results.
In other words, given:
struct Foobar
{
static int foo;
}
int main(char[][] args)
{
static Foobar fb = {foo : 123};
return 0;
}
compiler says:
Assertion failure: 'fieldi < ad->fields.dim' on line 126 in file 'init.c'
abnormal program termination
Is static fields inside structs legal syntax anyway? The D docs don't have
much to say about it (talks about class and variable "static" usage).
Aug 19 2003








"Walter" <walter digitalmars.com>