Bug 98396 - [1.5][compiler] Casting Conversion ignores second bound of Type Variables
Summary: [1.5][compiler] Casting Conversion ignores second bound of Type Variables
Status: CLOSED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-03 18:41 EDT by Tim Hanson CLA
Modified: 2005-06-10 11:38 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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