← Back to index
|
Original Bugzilla link
Bug 9145 – File is not opened if 'File' constructor is called in 'with' statement expression
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2012-12-12T03:54:00Z
Last change time
2013-02-08T14:08:31Z
Assigned to
nobody
Creator
maximzms
Comments
Comment #0
by maximzms — 2012-12-12T03:54:44Z
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 ----------
Comment #1
by andrej.mitrovich — 2013-02-08T14:08:31Z
Same cause as Issue 8269. *** This issue has been marked as a duplicate of issue 8269 ***