javac9 and lower bounded wildcards

Liam Miller-Cushon cushon at google.com
Mon Jan 12 18:07:58 UTC 2015


Thanks Maurizio. Do you have an estimate for when JDK-8039214 will be
fixed? I'm wondering if it's worth working around to make it easier to test
with 9, or if I should just wait for the patch.

On Mon, Jan 12, 2015 at 6:32 AM, Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:

> I Liam,
> this is related to this bug:
>
> https://bugs.openjdk.java.net/browse/JDK-8033718
>
> Fixing that type-system issue caused some most specific issues - this is
> being tracked here:
>
> https://bugs.openjdk.java.net/browse/JDK-8039214
>
> We are aware of the problem and are working on it.
>
> Maurizio
>
>
>
> On 09/01/15 18:14, Liam Miller-Cushon wrote:
>
>> 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/20150112/386da277/attachment.html>


More information about the compiler-dev mailing list