question about enhanced type-inference
Vicente-Arturo Romero-Zaldivar
vicente.romero at oracle.com
Thu Nov 21 05:58:28 PST 2013
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