Community
Participate
Working Groups
Build ID: M20090211-1700 Steps To Reproduce: Eclipse IDE does not show the compiler error, when running javac.exe the compiler generates the follwing error log: GenericEnums01.java:6: <T>getEastingUnit(java.lang.Class<T>) in buggy.GenericEnums01 cannot be applied to (java.lang.Class<capture of ?>) Enum<?> a = this.getEastingUnit(eastingUnit.getDeclaringClass()); More information:
Created attachment 137171 [details] class which does not compile with JDK but in IDE
javac 1.6_14 or javac 7.0b59 also compile this code fine.
This is a bug in javac 1.5 that has since been fixed in the current javac 6 & 7 builds. Eclipse is compiling this code without errors, as are javac 6 & 7.
Verified for 3.5RC3 using I20090526-2000.