openjdk team mailing list archive
-
openjdk team
-
Mailing list archive
-
Message #06004
[Bug 792492] Re: Inference with wildcard types causes selection of inapplicable method
** Attachment added: "Comp.java"
https://bugs.launchpad.net/bugs/792492/+attachment/2153763/+files/Comp.java
--
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in Ubuntu.
https://bugs.launchpad.net/bugs/792492
Title:
Inference with wildcard types causes selection of inapplicable method
Status in “openjdk-6” package in Ubuntu:
New
Bug description:
$ lsb_release -rd
Description: Ubuntu 11.04
Release: 11.04
$ java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.1) (6b22-1.10.1-0ubuntu1)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
Running javac against "Comp.java" (attached):
$ javac Comp.java
Comp.java:24: invalid inferred types for T; actual arguments do not conforms to inferred formal arguments
required: java.lang.Iterable<? extends java.util.Comparator<? super java.lang.String>>
found: java.util.List<java.util.Comparator<?>>
Comparator<String> c3 = compound(x);
^
1 error
This error should not occur (successful compilation should result).
This issue was a bug in javac that has since been fixed: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6638712
It was fixed in OpenJDK 6 1.10: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=648
Seeing as Ubuntu has 1.10.1, the bug should be fixed for it - but it
is still present.
In the OpenJDK Ubuntu package changelog, I see that this particular
change was reverted for Maverick:
https://launchpad.net/ubuntu/+source/openjdk-6/6b20-1.9.2-0ubuntu2 I
wonder if somehow the reversion persisted for Natty.
This problem is pretty major, as it means Ubuntu's shipping javac is
not able to compile a variety of valid Java source.
References