Bug 69800 - [1.5] eclipse fails to report incompatible types
Summary: [1.5] eclipse fails to report incompatible types
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-11 14:04 EDT by Igor Fedorenko CLA
Modified: 2005-01-11 11:02 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Fedorenko CLA 2004-07-11 14:04:03 EDT
The following code compiles by cheetah from CVS as of few minutes ago, but not
by javac as of SUN JDK 1.5.0 beta3 build 57. I agree with javac on this one as
not all subclasses of Object are assignable to A ;-)


========================================
package test.cheetah;
public class IncompatibleType {
    static class A {
    }
    A test() throws Exception {
        Class<? extends Object> clazz = null;
        return clazz.newInstance();
    }
}
========================================
Comment 1 Philipe Mulet CLA 2004-07-19 18:52:03 EDT
Tuned wildcard compatibility rules.
Added regression test: GenericTypeTest#test251

Fixed.