www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9557] New: std.array.array of array of immutable structs

reply d-bugmail puremagic.com writes:
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: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



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: -------
Feb 21 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9557


Jonathan Crapuchettes <jcrapuchettes gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |industry
                 CC|                            |jcrapuchettes gmail.com



16:22:15 PDT ---
I can confirm this issue for DMD 2.063.2 x86_64 linux, but it appears that it
is fixed in git HEAD.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 07 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9557


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




 I can confirm this issue for DMD 2.063.2 x86_64 linux, but it appears that it
 is fixed in git HEAD.
Cool. Closed. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Oct 07 2013