Bug 84558

Summary: Strange error message when using keywords "const" and "goto" as variable names
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2005-02-07 07:06:46 EST
I20050202-0800

double const= Math.PI;

The error message is:
'Syntax error on token "Invalid Character", invalid VariableDeclaratorId'

For keywords other than "const" and "goto", the error message includes the
offending constant's name in the error message, i.e.
'Syntax error on token "public", invalid VariableDeclaratorId'.
Comment 1 Olivier Thomann CLA 2005-02-07 20:58:48 EST
The problem comes from the fact that goto and const are not returned as tokens.
Comment 2 Olivier Thomann CLA 2005-02-07 21:38:12 EST
Added const and goto as tokens.
Error message are now consistent.
Fixed and released in HEAD.
Comment 3 David Audel CLA 2005-02-16 13:00:51 EST
Verified in I20050215-2300