[Issue 6841] writeln problem with array of tuples
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Oct 26 11:43:02 PDT 2011
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=6841
Kasumi Hanazuki <k.hanazuki at gmail.com> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |k.hanazuki at gmail.com
--- Comment #1 from Kasumi Hanazuki <k.hanazuki at 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: -------
    
    
More information about the Digitalmars-d-bugs
mailing list