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

           Summary: std.array.array of array of immutable structs
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2013-02-21 09:49:22 PST ---
import std.array: array;
struct Foo {
    immutable int x;
}
void main() {
    immutable a = [Foo(1)];
    auto r = a.array();
}


DMD 2.062:

...\dmd2\src\phobos\std\array.d(58): Error: cannot modify struct result[i] Foo
with immutable members
test.d(7): Error: template instance std.array.array!(immutable(Foo)[]) error
instantiating

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

Reply via email to