Community
Participate
Working Groups
Got this error on 3.1M2, using jdk1.5.0rc The code below causes this error, "Bound mismatch: The type M is not a valid substitute for the bounded parameter <M extends MyClass> of the type A<M>" public class MyClass {} public interface A<M extends MyClass> {} public interface B<M extends MyClass> extends A<M> {} public class C implements B<MyClass> Note - it works fine if you change class C to: public class C implements A<MyClass>
Cannot reproduce in latest. It compiles ok.
I verified that this does now compile correctly in N20041028. However, it works only on a clean build. Taking the same example as above, start with: public class C Let it compile with automatic compilation. Then change it back to: public class C implements B<MyClass> And it will give the same error as before. Telling it to do a clean build makes the error go away, though, which is much nicer than before.
Thanks for reopening, will investigate the incremental scenario.
Added GenericTypeTest#test358
There was a problem in our lazy resolution of type variable super types. When forcing resolution, they were bypassed. Implemented required support in BinaryTypeBinding#resolveType. Fixed
Works nicely in N20041101 on full or incremental build. Thanks!
Verified for 3.1M3 with build I20041101