javac9 and lower bounded wildcards
Liam Miller-Cushon
cushon at google.com
Fri Jan 9 18:14:11 UTC 2015
This is a bug, right? It reproduces with javac9-dev at head, and might be
related to JDK-8067858.
===
import java.util.*;
abstract class Test {
abstract <T> void f(Collection<? super T> i);
abstract <T> void f(List<? super T> i);
<T> void m(List<T> a) {
f(a);
}
}
===
Test.java:8: error: reference to f is ambiguous
f(a);
^
both method <T#1>f(Collection<? super T#1>) in Test and method
<T#2>f(List<? super T#2>) in Test match
where T#1,T#2 are type-variables:
T#1 extends Object declared in method <T#1>f(Collection<? super T#1>)
T#2 extends Object declared in method <T#2>f(List<? super T#2>)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20150109/4c6925d7/attachment-0001.html>
More information about the compiler-dev
mailing list