Bug 98396

Summary: [1.5][compiler] Casting Conversion ignores second bound of Type Variables
Product: [Eclipse Project] JDT Reporter: Tim Hanson <thanson>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tim Hanson CLA 2005-06-03 18:41:54 EDT
javac rejects the cast in the following program:

class Outer<T extends Number & Comparable<String>> {
    void foo(T t) {
    	Comparable<Integer> ci = (Comparable<Integer>) t;  
    }
}
Comment 1 Philipe Mulet CLA 2005-06-06 03:59:03 EDT
Added GenericTypeTest#test716
Comment 2 Philipe Mulet CLA 2005-06-06 04:10:34 EDT
Cast conversion check did not properly handle matching supertype comparison.
Fixed
Comment 3 Frederic Fusier CLA 2005-06-07 11:37:52 EDT
Verified for 3.1 RC2 using build N20050607-0010 + JDT/Core HEAD
Comment 4 David Audel CLA 2005-06-10 11:38:04 EDT
Verified for 3.1 RC2 using build I20050610-0010