[Issue 7433] New: writeln of char range
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 3 15:44:46 PST 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 at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at 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: -------
More information about the Digitalmars-d-bugs
mailing list