[Issue 8792] New: std.algorithm.joiner doesn't return a proper forward range`
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Oct 9 20:49:35 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8792
Summary: std.algorithm.joiner doesn't return a proper forward
range`
Product: D
Version: D2
Platform: All
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: hsteoh at quickfur.ath.cx
--- Comment #0 from hsteoh at quickfur.ath.cx 2012-10-09 20:25:31 PDT ---
import std.algorithm;
import std.range;
import std.stdio;
void main() {
auto x = [[1],[2],[3]];
auto yy = x.joiner;
assert(isForwardRange!(typeof(yy)));
writeln(yy.save);
writeln(yy);
}
The output is:
[]
[1, 2, 3]
Which means that yy.save didn't save at all! This is a pretty major bug since
it makes joiner unusable where the result needs to be a forward range.
--
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