javac9 and lower bounded wildcards

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Jan 12 18:46:41 UTC 2015


On 12/01/15 18:07, Liam Miller-Cushon wrote:
> 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.
Dan is working on it - I'll let him reply to your question; my sense is 
that there's quite a deep trail of type-system fixes involved in order 
to get us there...

Maurizio
>
> On Mon, Jan 12, 2015 at 6:32 AM, Maurizio Cimadamore 
> <maurizio.cimadamore at oracle.com 
> <mailto: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/98b004e8/attachment-0001.html>


More information about the compiler-dev mailing list