www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7433] New: writeln of char range

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7433

           Summary: writeln of char range
           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



Title: 
Component: Phobos
Severity: 
Code number: 
Keywords: 
Outcome: 
Is done: no


I don't know what's happening here:


import std.stdio, std.algorithm;
void main() {
    auto s1 = "hello";
    auto m1 = map!(c => c)(s1);
    writeln(m1);
}


DMD 2.058head gives:

...\dmd2\src\phobos\std\range.d(295): Error: static assert  "Cannot put a
Result into a LockingTextWriter"
...\dmd2\src\phobos\std\format.d(1509):        instantiated from here:
put!(LockingTextWriter,Result)
...\dmd2\src\phobos\std\format.d(1984):        instantiated from here:
formatRange!(LockingTextWriter,Result,char)
...\dmd2\src\phobos\std\format.d(2228):        instantiated from here:
formatValue!(LockingTextWriter,Result,char)
...\dmd2\src\phobos\std\format.d(319):        ... (2 instantiations, -v to
show) ...
...\dmd2\src\phobos\std\stdio.d(1563):        instantiated from here:
write!(Result,char)
test2.d(5):        instantiated from here: writeln!(Result)


Note that array(m1) works.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 03 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7433


simendsjo <simendsjo gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simendsjo gmail.com



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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 17 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7433


Kenji Hara <k.hara.pg gmail.com> changed:

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



*** This issue has been marked as a duplicate of issue 7476 ***

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