Community
Participate
Working Groups
When I upgraded from M7 to RC2, a new compiler error was introduced to my code. #### public class TestEclipse { public abstract class ClassA<A, B> { public abstract B method(A param); } public class ClassB<C, D extends C> { // the following field declaration causes an error ClassA<? super C, ? extends D> classA; public D method(D d) { return classA.method(d); } } } #### Declaring the field classA in the following way ClassA<? super C, D> classA; causes RC2 to remove the error, but javac successfully compiles both the original and the changed code.
Reproduced. It looks completely wrong.
+1 for RC3 Darin - pls vote for it. Problem is that we issue an error which is totally wrong (bound mismatch for variable with no formal bound !?) and it used to work pre-RC2. Added GenericTypeTest#test761-762 Problem comes from merged algorithm to find supertype erasure which lost custom support for type variables in supertypes (here: ? extends D). Fix is to propagate type variable check when walking supertypes.
+1
Fixed
Verified using N20050616-0010 + JDT/Core HEAD