Bug 78314

Summary: In normal Java Class: JavaIdentifierNoAround expected after this token
Product: [Tools] AspectJ Reporter: Eric Bodden <eric>
Component: CompilerAssignee: Adrian Colyer <adrian.colyer>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 1.2.1 M1   
Target Milestone: 1.5.0 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Project giving the appropriate erroron compilation none

Description Eric Bodden CLA 2004-11-10 12:10:35 EST
Hi. In the enclosed project I am getting the following compilation error which 
occurs in a normal Java compilation unit (no aspect):

Severity	Description	Resource	In Folder	Location	Creation Time
2	Syntax error on token "foo", JavaIdentifierNoAround expected after this 
token	Main.java	AspectJTest-RV/src/a	line 7	November 10, 2004 5:51:13 PM
Comment 1 Eric Bodden CLA 2004-11-10 12:11:28 EST
Created attachment 15780 [details]
Project giving the appropriate erroron compilation
Comment 2 Eric Bodden CLA 2004-11-10 12:15:58 EST
Addition just to make things clear:
Of course the code in Class a.Main cannot compile correctly since I *do* have a 
syntax error (code is not inside a method declaration), but the error message is 
not really appropriate here.
Comment 3 Adrian Colyer CLA 2005-03-23 08:55:40 EST
for investigation in aj5m3 whilst we have the parser open...
Comment 4 Adrian Colyer CLA 2005-08-20 08:12:41 EDT
Suprisingly hard to get the recovery rules to do the right thing for us. It now
says:

"Syntax error on tokens, valid member declaration expected instead" 

at the offending line.

It's a lot more helpful than the previous message, and would involve a lot of
work to substantially improve the message any further than this so I'm going to
close this out there.