Bug 78314 - In normal Java Class: JavaIdentifierNoAround expected after this token
Summary: In normal Java Class: JavaIdentifierNoAround expected after this token
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.2.1 M1   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 1.5.0 M3   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-10 12:10 EST by Eric Bodden CLA
Modified: 2005-08-20 08:12 EDT (History)
0 users

See Also:


Attachments
Project giving the appropriate erroron compilation (11.68 KB, application/octet-stream)
2004-11-10 12:11 EST, Eric Bodden CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.