June 25, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8297

           Summary: Cannot access front of array with immutable elements
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: rb@d-coding.com


--- Comment #0 from Roman D. Boiko <rb@d-coding.com> 2012-06-25 09:04:47 PDT ---
import std.range;
struct Element {
  //immutable // uncomment to break compilation
   int _i;
  this(int i) { _i = i; }
}
void main() {
  auto arr = [Element.init];
  arr.front;
}

Declaring _i as immutable yields the following compilation error:

/usr/include/x86_64-linux-gnu/dmd/phobos/std/array.d(460): Error:
a[0LU] isn't mutable
sample.d(11): Error: template instance std.array.front!(Element)
error instantiating

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
June 26, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8297


Jonathan M Davis <jmdavisProg@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jmdavisProg@gmx.com
         Resolution|                            |DUPLICATE


--- Comment #1 from Jonathan M Davis <jmdavisProg@gmx.com> 2012-06-25 17:53:27 PDT ---
*** This issue has been marked as a duplicate of issue 6336 ***

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