digitalmars.D.bugs - [Issue 4024] New: Last catch only accepts block statement
- d-bugmail puremagic.com (49/49) Mar 28 2010 http://d.puremagic.com/issues/show_bug.cgi?id=4024
- d-bugmail puremagic.com (11/11) May 30 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4024
- d-bugmail puremagic.com (10/10) May 30 2012 http://d.puremagic.com/issues/show_bug.cgi?id=4024
http://d.puremagic.com/issues/show_bug.cgi?id=4024
Summary: Last catch only accepts block statement
Product: D
Version: 2.041
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody puremagic.com
ReportedBy: biozic free.fr
void main()
{
try
int i;
catch (Exception e)
int j;
catch {
int k;
}
try
int i;
catch (Exception e)
int j;
catch
int k; // ERROR:: compiler expects (
}
A NoScopeNonEmptyStatement is expected after the last catch. Maybe this patch
can help solve the problem.
===================================================================
--- parse.c (revision 422)
+++ parse.c (working copy)
-4064,11 +4064,11 Statement *Parser::parseStatement(int fl
Type *t;
Identifier *id;
Loc loc = this->loc;
nextToken();
- if (token.value == TOKlcurly)
+ if (token.value == TOKlcurly || token.value != TOKlparen)
{
t = NULL;
id = NULL;
}
else
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 28 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4024 Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/17b73a6022b0185dfde932cbe33da1741e7de963 https://github.com/D-Programming-Language/dmd/commit/07af203c9c38022086aa059a11f5934484fee6d7 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 30 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4024
Walter Bright <bugzilla digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |bugzilla digitalmars.com
Resolution| |FIXED
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 30 2012









d-bugmail puremagic.com 