Bug 106026 - [1.5][dom] ITypeBinding#isSubTypeCompatible(ITypeBinding) does not work with generic bindings
Summary: [1.5][dom] ITypeBinding#isSubTypeCompatible(ITypeBinding) does not work with ...
Status: RESOLVED INVALID
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.3 RC4   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-04 06:52 EDT by Markus Keller CLA
Modified: 2007-06-22 07:20 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 Markus Keller CLA 2005-08-04 06:52:24 EDT
M20050727-1200

class Top<E> { }
class Sub<S> extends Top<S> { }

Take the generic type binding of the declaration Sub<S> and ask it
isSubTypeCompatible(the generic type binding of the declaration Top<E>)
is: false
expected: true

Works e.g. for
class Raw extends Top { }
Comment 1 Jerome Lanneluc CLA 2007-06-22 07:20:29 EDT
According to http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.10, "Subtyping does not extend through generic types: T <: U does not imply that C<T> <: C<U>.". So in this case, we behave as spec'ed.