[Issue 4313] undefined identifier error with scope guard statement

2012-01-30 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4313


yebblies yebbl...@gmail.com changed:

   What|Removed |Added

 CC||yebbl...@gmail.com
Version|2.041   |D1  D2


--- Comment #2 from yebblies yebbl...@gmail.com 2012-01-31 14:02:11 EST ---
(In reply to comment #1)
 Seems a bit strange. According to CompoundStatement::semantic this is 
 rewritten
 as try-catch-finally.
 
 Even scope(exit) would have the auto res = 0 in the try block which would
 result in undefined identifier.

Because the declaration is nothrow, main's body becomes:
{
int res = 0;

writeln(res);

return 0;
}

But yes, this is a bug.

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


[Issue 4313] undefined identifier error with scope guard statement

2010-06-14 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4313


Trass3r mrmoc...@gmx.de changed:

   What|Removed |Added

   Keywords||accepts-invalid


--- Comment #1 from Trass3r mrmoc...@gmx.de 2010-06-14 12:47:08 PDT ---
Seems a bit strange. According to CompoundStatement::semantic this is rewritten
as try-catch-finally.

Even scope(exit) would have the auto res = 0 in the try block which would
result in undefined identifier.

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