Summary: Array of closures assign problem
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 2010-12-24 00:40:43 PST ---
This D2 program compiles with no errors:

void delegate()[1] foo;
void main() {
    int n;
    foo[0] = { n++; };

But this one:

void delegate()[1] foo;
void main() {
    int n;
    foo[] = [{ n++; }];

With DMD 2.051:

test.d(4): Error: cannot implicitly convert expression ([delegate void()




]) of type void delegate()[] to const(void delegate()[])

It looks like a front-end bug.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to