Bug 277874 - [1.5][compiler] Error not shown in IDE: Generic Enum assignment
Summary: [1.5][compiler] Error not shown in IDE: Generic Enum assignment
Status: VERIFIED NOT_ECLIPSE
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.5 RC3   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-26 11:27 EDT by Martin Kunert CLA
Modified: 2009-05-27 15:27 EDT (History)
1 user (show)

See Also:


Attachments
class which does not compile with JDK but in IDE (328 bytes, application/octet-stream)
2009-05-26 11:29 EDT, Martin Kunert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Kunert CLA 2009-05-26 11:27:43 EDT
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:
Comment 1 Martin Kunert CLA 2009-05-26 11:29:42 EDT
Created attachment 137171 [details]
class which does not compile with JDK but in IDE
Comment 2 Olivier Thomann CLA 2009-05-26 13:56:30 EDT
javac 1.6_14 or javac 7.0b59 also compile this code fine.
Comment 3 Kent Johnson CLA 2009-05-26 14:22:42 EDT
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.
Comment 4 Olivier Thomann CLA 2009-05-27 15:27:48 EDT
Verified for 3.5RC3 using I20090526-2000.