http://d.puremagic.com/issues/show_bug.cgi?id=6789
SomeDude <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from SomeDude <[email protected]> 2012-04-23 03:58:17 PDT --- This is not a bug. The test actually works if the file "test.d" exists beforehand. If it doesn't exist, one must open the file in write mode. By default, the file is open in read mode. This works as intended. import std.stdio; void main() { bool foo; auto lines = (foo ? File("test.d", "w") : File("test.d", "w")).byLine(); writeln(lines.empty); // true auto handle = File("test.d"); lines = handle.byLine(); writeln(lines.empty); // false } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
