Summary: Hole in Const System:  popFront()
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from David Simcha <> 2010-09-16 17:38:03 PDT ---
Apparently using ref array parameters/implicit conversions gets around const in
this example.

void popFront(T)(ref T[] arr) {
    arr = arr[1..$];

void main() {
    immutable arr = [1,2,3,4,5].idup;
    assert(arr == [2,3,4,5]);  // PASSES

Please take your time fixing this, though, as much of std.range relies on this
bug to work correctly with const/immutable arrays.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to