[Issue 7510] New: implicit conversion to immutable fails for pure delegates and function pointers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 15 10:41:41 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=7510

           Summary: implicit conversion to immutable fails for pure
                    delegates and function pointers
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2012-02-15 10:41:38 PST ---
DMD 2.058:

void main(){
    auto foo()pure{return new int[100];}
    immutable int[] x = foo(); // ok
    immutable int[] y = {return new int[100];}(); // ng
    immutable int[] z = delegate{return new int[100];}(); // ng
}

The code should compile.

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


More information about the Digitalmars-d-bugs mailing list