digitalmars.D.bugs - [Issue 7884] New: std.file.DirIterator.opApply is wrong.
- d-bugmail puremagic.com (19/19) Apr 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7884
- d-bugmail puremagic.com (25/25) Apr 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7884
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
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: -------
Apr 10 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7884
timon.gehr gmx.ch changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
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: -------
Apr 10 2012








d-bugmail puremagic.com