It is forbidden by specification, but an interesting reason.

for example:

struct S
{
    static S opCall()
    {
        S res;
        int a,b,c,d;
int[10] data; // If I comment out this line compilation goes smoothly
        return res;
    }
}

void main()
{
    static S s = S();
}

struct_array.d(14): Error: cannot evaluate opCall() at compile time
struct_array.d(14): Error: cannot evaluate opCall() at compile time

Reply via email to