December 24, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5367

           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
        AssignedTo: nobody@puremagic.com
        ReportedBy: bearophile_hugs@eml.cc


--- Comment #0 from bearophile_hugs@eml.cc 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()

{

n++;

}

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


It looks like a front-end bug.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=5367


yebblies <yebblies@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies@gmail.com
         Resolution|                            |WORKSFORME


--- Comment #1 from yebblies <yebblies@gmail.com> 2012-02-02 15:37:29 EST ---
Probably fixed with the other delegate conversion bugs.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------