[Issue 18153] New: undocumented public structs ByLine, ByRecord, ByChunk
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jan 2 23:06:30 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18153
Issue ID: 18153
Summary: undocumented public structs ByLine, ByRecord, ByChunk
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: minor
Priority: P1
Component: phobos
Assignee: nobody at puremagic.com
Reporter: dkorpel at live.nl
I accidentily wrote this code:
import std.stdio;
foreach(line; File(fileName, "r").ByLine) {
...
}
And got this confusing error:
Error: cannot resolve type for ((File __slFile908 = File(null, null);) ,
__slFile908).this(fileName, "r").ByLine(Char, Terminator)
It turns out I wasn't calling the method 'byLine' but the constructor of the
struct 'ByLine'. Is there any reason the struct ByLine, as well as ByChunk and
ByRecord, are public? I can't find any documentation on them. I suggest either
making them private (like ByLineCopy), or documenting their use.
--
More information about the Digitalmars-d-bugs
mailing list