[Issue 9145] New: File is not opened if 'File' constructor is called in 'with' statement expression
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Dec 12 03:54:45 PST 2012
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: nobody at puremagic.com
ReportedBy: maximzms at gmail.com
--- Comment #0 from Maksim Zholudev <maximzms at gmail.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list