Community
Participate
Working Groups
Using 3.1M2 and java 1.5.0-rc: Given 2 files: ------ Intf.java: public interface Intf<D extends Comparable<D>, I extends Comparable<D>> { public void f(Intf<D,?> val); } Impl.java: public class Impl <M extends Comparable<M>, P extends Comparable<M>> implements Intf<M,P> { public void f(Intf<D,?> val) { } } --------- I get an error message at the "?" character in definition of f in Impl.java: Bound mismatch: The type ? is not a valid substitute for the bounded parameter <I extends Comparable<D>> of the type Intv<D,I> It compiles without warning or error using sun compiler.
[Errata] Error message said "Intf<D,I>" (not "Intv<D,I>")
Using HEAD, we still have this error message: ---------- 1. ERROR in D:\usr\OTI\workspaces\dvpt\v31\HEAD\_Bug\Impl.java (at line 4) public void f(Intf<M,?> val) { } ^ Bound mismatch: The type ? is not a valid substitute for the bounded parameter <I extends Comparable<D>> of the type Intf<D,I> ---------- 1 problem (1 error)
Tuned semantics for variable boundcheck (unbound wildcard scenario). Added regression test: GenericTypeTest#test351 Fixed
Verified for 3.1M3 with build I200411040100