Summary: std.stdio.File + ternary = bug
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from David Simcha <> 2011-10-07 16:48:04 PDT ---
I haven't been able to reduce this far enough to know for sure whether this is
a DMD or Phobos bug, but the following ternary operator expression should work:

import std.stdio;

void main() {
    bool foo;
    auto lines = (foo ? File("test.d") : File("test.d")).byLine();
    writeln(lines.empty);  // true

    auto handle = File("test.d");
    lines = handle.byLine();
    writeln(lines.empty);  // false

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to