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


Kasumi Hanazuki <k.hanaz...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |k.hanaz...@gmail.com


--- Comment #1 from Kasumi Hanazuki <k.hanaz...@gmail.com> 2011-10-26 11:41:54 
PDT ---
This problem reduces to the following case,
where dmd rejects ref to struct type with a const field, with error:
    std/array.d(460): Error: a[0u] isn't mutable

I think this is a compiler bug.

----

import std.array;
struct A {
   const(char) c;
}
void main() {
   A[] aa;
   aa.front;
}

// ref T front(T)(T[] a)
// if (!isNarrowString!(T[]) && !is(T[] == void[]))
// {
//     assert(a.length, "Attempting to fetch the front of an empty array of " ~
//                      typeof(a[0]).stringof);
//     return a[0];  // ** std/array.d(460)
// }

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

Reply via email to