Community
Participate
Working Groups
3.0rc1 (javac does that) in 1.5 enum is a keyword - we should have an options warning on all lower levels saying that this is the case. (just like with 'assert')
that was actually planned for all new 1.5 keywords, in 1.5 branch.
what are the other keywords? i thought it was just enum.
Fixed and test added Compliance_1_3#test84() Compliance_1_4#test84() Compliance_1_5#test84() The new compiler option is * COMPILER / Reporting Usage of 'enum' Identifier * When enabled, the compiler will issue an error or a warning whenever 'enum' is * used as an identifier (reserved keyword in 1.5) * - option id: "org.eclipse.jdt.core.compiler.problem.enumIdentifier" * - possible values: { "error", "warning", "ignore" } * - default: "warning" And added a new constant to JavaCore JavaCore#COMPILER_PB_ENUM_IDENTIFIER
Verified in I200409240100.
Is it possible to turn this warning off?
Look at 'Preferences>Java>Compiler>JDK Compliance'. Uncheck 'Use default compliance setting' and change the severity of 'Disallow identifiers caller 'enum''.