April 10, 2012 [Issue 7884] New: std.file.DirIterator.opApply is wrong. | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=7884 Summary: std.file.DirIterator.opApply is wrong. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: timon.gehr@gmx.ch --- Comment #0 from timon.gehr@gmx.ch 2012-04-10 03:54:23 PDT --- std.file.DirIterator.opApply always returns '1' instead of the result of the delegate call. This makes it impossible to properly exit from a foreach body that uses the DirIterator as the aggregate via a return or goto statement. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
April 10, 2012 [Issue 7884] std.file.DirIterator.opApply is wrong. | ||||
---|---|---|---|---|
| ||||
Posted in reply to timon.gehr@gmx.ch | http://d.puremagic.com/issues/show_bug.cgi?id=7884 timon.gehr@gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME --- Comment #1 from timon.gehr@gmx.ch 2012-04-10 03:59:22 PDT --- Apparently this is fixed in git head: struct DirIterator { private: RefCounted!(DirIteratorImpl, RefCountedAutoInitialize.no) impl; this(string pathname, SpanMode mode, bool followSymlink) { impl = typeof(impl)(pathname, mode, followSymlink); } public: @property bool empty(){ return impl.empty; } @property DirEntry front(){ return impl.front; } void popFront(){ impl.popFront(); } } No opApply anymore. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation