Bug 198183 - [Compiler6.0] compiler reports error: 'enum' should not be used as an identifier
Summary: [Compiler6.0] compiler reports error: 'enum' should not be used as an identifier
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: 1.6.0 M1   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-28 08:18 EDT by helwick CLA
Modified: 2008-01-22 12:15 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description helwick CLA 2007-07-28 08:18:30 EDT
Build ID: I20070625-1500

Steps To Reproduce:
1. Define the following class in an AspectJ project:
public class Eclipse33_AJDT_Problem {
	public static enum SomeEnum { VAL1, VAL2,; }
}
2. the compiler will report the following error, when compliance level is set to 6.0:
'enum' should not be used as an identifier, since it is a reserved keyword from source level 5.0 on
3. AJDT version: 1.5.0.200706070619, AspectJ version: 1.5.4.200705211336
4. when you remove the AspectJ Capability, the class compiles just fine.

More information:
The Java runtime for eclipse 3.3 is set to:
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
Comment 1 Matt Chapman CLA 2007-08-07 08:39:30 EDT
This will be because the aspectj compiler is currently based on an old version of the JDT compiler
Comment 2 Andrew Clement CLA 2007-10-09 12:43:47 EDT
Will be fixed when we move to the an Eclipse compiler version that supports 6.0
Comment 3 Andrew Clement CLA 2008-01-22 12:15:40 EST
This is fixed in the latest AJDT 1.5.2 dev builds for Eclipse 3.3 - available from the dev download site and update site:

http://www.eclipse.org/ajdt/downloads/
http://download.eclipse.org/tools/ajdt/33/dev/update

This includes AspectJ1.6.0m1