[Issue 13084] New: ModuleInfo.opApply delegate expects immutable parameter

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jul 9 12:58:44 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13084

          Issue ID: 13084
           Summary: ModuleInfo.opApply delegate expects immutable
                    parameter
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: druntime
          Assignee: nobody at puremagic.com
          Reporter: doob at 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?

--


More information about the Digitalmars-d-bugs mailing list