www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13148] New: ModuleInfo fields are unnecessary changed to const

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

          Issue ID: 13148
           Summary: ModuleInfo fields are unnecessary changed to const
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: k.hara.pg gmail.com

Test case:

void main()
{
    ModuleInfo mi;
    foreach (m; ModuleInfo)
    { mi = *m; }
}

With 2.065:
-> OK 

With 2.066 git-head:
-> Error: cannot modify struct mi ModuleInfo with immutable members

--
Jul 16 2014