Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4.16, 3.0.0-alpha-4, 2.5.6
-
None
Description
Consider the following:
interface I {} class C<T extends Number & I> { T meth() {} } class X extends C<Integer> {} // should produce error "The type Integer is not a valid substitute for the bounded parameter <T extends java.lang.Number & I>" new C<Integer>() // should produce error "The type Integer is not a valid substitute for the bounded parameter <T extends java.lang.Number & I>"
If the type bound Number is not satisfied, an error is produced. However, failure to satisfy the additional interface(s) does not produce a compiler error.
Attachments
Issue Links
- links to