Community
Participate
Working Groups
/* * Created on 19.10.2004 * */ /** * @author ah * * Compiles ok with javac 1.5.0-beta3 into a class that can be run. * * Compiles not with eclipse Version: 3.1.0 Build id: 200409240800 * * eclipse tells you: Bound mismatch: The type SubI * <Q>is not a valid substitute for the bounded parameter <E2 extends SuperI <E2>>of the type AllegedBoundMismatch <E2>Bound mismatch: The type SubI * <Q>is not a valid substitute for the bounded parameter <E2 extends SuperI <E2>>of the type AllegedBoundMismatch <E2> * * */ public class GenericParamTypeBug { public static void main(String[] args) { System.out.println("Hello, I'm class " + GenericParamTypeBug.class); class AllegedBoundMismatch<E2 extends SuperI<E2>> { } AllegedBoundMismatch<SubI<Q>> trial = new AllegedBoundMismatch<SubI<Q>> (); } } class Q { } interface SubI<Q> extends SuperI<SubI<Q>> { } interface SuperI<Q> { }
Resolved type compatibility issues, and inneremulation (enclosing access). Added regression test: GenericTypeTest#test377
Fixed
Verified for 3.1 M3 with build I200411040800