Community
Participate
Working Groups
I have the following classes: public class Foo { public interface Model { } public interface View<M extends Model> { M getTarget() ; } } public class Bar { public interface Model extends Foo.Model { } public interface View<M extends Model> extends Foo.View<M> { } } public class usettestclass { public static void main(String[] args) { Bar.View<?> bv = null ; Bar.Model m = bv.getTarget() ; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Type mistmatch } } This should not be a type mismatch, and it works just fine with sun compiler.
Reproduced in latest.
Added regression test: GenericTypeTest#test442. Problem is located in wildcard relocation when creating parameterized type bindings, this should not occur, and was introduced to address bug 76434, which got revised. Removing relocation addresses the problem, the wildcard is properly remembering its origin and is thus compatbile as expected with variable type. Fixed
Verified in I20050214