Summary: Function call in struct initializer fails to compile
           Product: D
           Version: 2.020
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]

Compiler tries to CTFE the function:

struct S
    int x;

int foo(int i)
    return i;

void main()
    int i;
    S s = { foo(i) };
    return 0;
test.d(20): Error: variable i is used before initialization


Reply via email to