http://d.puremagic.com/issues/show_bug.cgi?id=4895
Summary: isOutputRange is true for ranges which can't be output ranges Product: D Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: jmdavisp...@gmx.com --- Comment #0 from Jonathan M Davis <jmdavisp...@gmx.com> 2010-09-19 03:39:49 PDT --- This compiles: import std.range; struct Range { @property bool empty() { return true; } @property int front() { return 7; } void popFront() { } @property Range save() { return this; } } void main() { static assert(isInputRange!(Range)); static assert(isOutputRange!(Range, int)); } It shouldn't. You can't ever assign to front. I believe that the problem is that this portion of put() ends up being compiled in: static if (is(typeof(r.front = e, r.popFront()))) { r.front = e; r.popFront(); } since putting static assert(0); in that portion of put() causing the compilation to fail. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------