http://d.puremagic.com/issues/show_bug.cgi?id=9145

           Summary: File is not opened if 'File' constructor is called in
                    'with' statement expression
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Maksim Zholudev <[email protected]> 2012-12-12 03:54:44 
PST ---
Code:
----------
import std.stdio;

void main()
{
    auto f = File("test.txt", "rt");
    with(f)
        stdout.writeln(isOpen);

    with(File("test.txt", "rt"))
        stdout.writeln(isOpen);
}
----------

Output for DMD v2.061, 64 bit (from GitHub):
----------
true
false
----------

Output for GDC-4.6:
----------
true
true
----------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to