www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14745] New: Qualifiers rejected for delegate literals


          Issue ID: 14745
           Summary: Qualifiers rejected for delegate literals
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: timon.gehr gmx.ch

This code is (correctly) accepted by DMD 2.067:

void main(){
    auto foo1()pure immutable{ return 0; }
    auto foo2()pure const{ return 0; } 

But this is not:

void main(){
    auto dg1=()pure immutable{ return 0; };
    auto dg2=()pure const{ return 0; };

Both should compile. (There should be no difference in how qualifiers are
handled for named and anonymous nested functions.)

Jun 28 2015