Community
Participate
Working Groups
Build ID: I20070625-1500 Steps To Reproduce: This code compiles in versions 3.1 and 3.2 of eclipse but not in version 3.3 or 3.4, public class Test { public <A, B> void func(Class<? extends XX<A, B>> cls) {} public void func() { func(XX.class); } class XX<A, B> {} } More information:
This was a bug which got resolved in 3.3. Basically, the compiler should have been rejecting such code. This results from the fact Class<XX> is not assignable to Class<? extends XX<A,B>>. Basically raw type arguments are not compatible with parameterized forms of type arguments. Invalid, btw javac5 (1.5.0_12-ea) and javac6 (1.6.0_03-ea) both agree with us. Added GenericTypeTest#test1157
Verified for 3.4 M2 using build I20070917-0010.