[Issue 7264] New: Can't iterate result from 4-arg dirEntries as string
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 10 00:24:35 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7264
Summary: Can't iterate result from 4-arg dirEntries as string
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: aldacron at gmail.com
--- Comment #0 from Mike Parker <aldacron at gmail.com> 2012-01-10 00:24:33 PST ---
This example given for the 3-arg version of dirEntries works as expected:
---
foreach (string name; dirEntries(".", "*.d", SpanMode.breadth))
{
writeln(name);
}
---
But when modified to use the 4-arg version, like so:
---
import std.stdio, std.file;
void main()
{
foreach (string name; dirEntries(".", "*.d", SpanMode.breadth))
{
writeln(name);
}
}
---
It fails with this error:
fail.d(7): Error: cannot implicitly convert expression (__r13.front()) of type
D
irEntry to string
--
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