question about enhanced type-inference

Liam Miller-Cushon cushon at google.com
Thu Nov 21 10:49:41 PST 2013


Thanks Vicente,

I will follow the original issue.

Liam


On Thu, Nov 21, 2013 at 5:58 AM, Vicente-Arturo Romero-Zaldivar <
vicente.romero at oracle.com> wrote:

> Hi Liam,
>
> I have included your test case in this bug entry [1], as it has some
> similarities with a previously reported issue.
>
> Thanks,
> Vicente
>
> [1] https://bugs.openjdk.java.net/browse/JDK-8028547
>
>
> On 19/11/13 18:16, Liam Miller-Cushon wrote:
>
>> I have been experimenting with migrating some code to compile with javac
>> 8's new graph inference algorithm. This has generally gone quite smoothly,
>> but I ran into the following case where inference succeeds with legacy
>> inference and fails with graph inference.
>>
>> Is this a known limitation of the new inference algorithm?
>>
>> Here's the code:
>>
>> ===
>>
>> interface Task<E extends Exception> {}
>> class Comparator<T> {}
>> class CustomException extends Exception {}
>>
>> class TaskQueue<E extends Exception, T extends Task<E>> {}
>>
>> abstract class Test {
>>    abstract <E extends Exception, T extends Task<E>>
>>        TaskQueue<E, T> create(Comparator<? super T> comparator);
>>
>>    void f(Comparator<Task<CustomException>> comp) {
>>      TaskQueue<CustomException, Task<CustomException>> queue =
>> create(comp);
>>    }
>> }
>>
>> ===
>>
>>
>


More information about the lambda-dev mailing list