Bug 332339 - key word enum won't compile
Summary: key word enum won't compile
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-10 15:39 EST by Cat Phelix CLA
Modified: 2011-01-25 08:13 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 Cat Phelix CLA 2010-12-10 15:39:57 EST
Build Identifier: Version: Helios Service Release 1 Build id: 20100917-0705

I don't know that this is a bug. I went to your Forums page and couldn't figure  out how to start a message (I'm a decent programmer but not a computer user whiz).
I'm using Java 6 u22.
I put this enum declaration in my code:
public enum CLASS { cC1, cC2, cC3, cC4, cC5, cC6, cC7, cC8, cC9 }; and get
Multiple markers at this line
	- Syntax error on token ",", delete this token
	- Syntax error, insert ";" to complete FieldDeclaration
	- cC1 cannot be resolved to a type
	- enum cannot be resolved to a type
	- 'enum' should not be used as an identifier, since it is a reserved keyword from source 
	 level 1.5 on

I can compile and use the same enum in a BlueJay project. I'm sure something is not set right in eclipse but I'm not good enough to fix it. Please help.

Reproducible: Always

Steps to Reproduce:
1. Create a java file with an enum declaration
2. Compile it.
3.
Comment 1 Olivier Thomann CLA 2010-12-10 16:28:21 EST
What are the compiler settings for this project ?
Comment 2 Olivier Thomann CLA 2010-12-16 09:27:14 EST
Your project is clearly not setup to compile 1.5 code.
Closing as INVALID.

Reopen if you still get a problem once you set your compiler settings to be 1.5 for this project.
Comment 3 Ayushman Jain CLA 2011-01-25 08:13:49 EST
Verified for 3.7M5