Thread overview
[Issue 7433] New: writeln of char range
Feb 17, 2012
simendsjo
Feb 19, 2012
Kenji Hara
February 03, 2012
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


--- Comment #0 from bearophile_hugs@eml.cc 2012-02-03 15:44:45 PST ---
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: -------
February 17, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7433


simendsjo <simendsjo@gmail.com> changed:

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


--- Comment #1 from simendsjo <simendsjo@gmail.com> 2012-02-17 10:45:32 PST ---
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: -------
February 19, 2012
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


--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2012-02-18 22:43:55 PST ---
*** 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: -------