www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13084] New: ModuleInfo.opApply delegate expects immutable


          Issue ID: 13084
           Summary: ModuleInfo.opApply delegate expects immutable
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: doob me.com

The following code works fine in DMD 2.065.0:

void main ()
    ModuleInfo* minfo;

    foreach (m ; ModuleInfo)
        minfo = m;

But in DMD 2.066.0-b1 the delegate parameter in ModuleInfo.opApply expects an
immutable ModuleInfo*. This is a breaking change and a regression.

Is it possible to fix this by overloading opApply with a mutable parameter?

Jul 09 2014