[Issue 1894] New: Missed scope guard statements
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 5 17:25:36 PST 2008
http://d.puremagic.com/issues/show_bug.cgi?id=1894
Summary: Missed scope guard statements
Product: D
Version: 2.010
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: sjackso at cs.wisc.edu
This snippet:
{
if( true ){ scope(exit) writef("hello"); }
writefln(" world" );
}
Produces the output "hello world", as expected. However, when the if
statement's braces are removed...
{
if( true ) scope(exit) writef("hello");
writefln( " world" );
}
... then the first writef call is skipped entirely, and the output is " world".
No errors or compiler warnings are generated.
--
More information about the Digitalmars-d-bugs
mailing list