Bug 281993 - [1.5][compiler] Generics inference no longer works (worked under 3.4)
Summary: [1.5][compiler] Generics inference no longer works (worked under 3.4)
Status: VERIFIED DUPLICATE of bug 277643
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M1   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-30 08:02 EDT by Benoit Xhenseval CLA
Modified: 2009-08-04 04:56 EDT (History)
3 users (show)

See Also:


Attachments
Test cases. MyClass does not compile (1.27 KB, application/x-zip-compressed)
2009-06-30 08:02 EDT, Benoit Xhenseval CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Benoit Xhenseval CLA 2009-06-30 08:02:16 EDT
Created attachment 140494 [details]
Test cases. MyClass does not compile

Build ID: 20090621-0832

Steps To Reproduce:
1. The enclosed very simple testcase, MyClass.java compiles under 3.4 but no longer under 3.5
2. use JDK 1.6, (013), used JDK1.6 compliance


More information:
Moving from 3.4 to 3.5, my project suddenly stopped compiling under Eclipse (it still compiles ok with javac and Maven).

It seems that the method call wants to infer the type to a MyReader (interface) rather than the AReader, a concrete class.

The factory method however is defined as:
T getDBReaderByClass(final Class<T> dbReaderClass)

So, given a AReader.class I would expect this to return AReader instance.
Comment 1 Kent Johnson CLA 2009-07-06 14:48:39 EDT

*** This bug has been marked as a duplicate of bug 277643 ***
Comment 2 Srikanth Sankaran CLA 2009-08-04 04:56:13 EDT
Verified for 3.6M1