Invalid method reference with generics
Nick Williams
nicholas+openjdk at nicholaswilliams.net
Wed Jul 17 14:10:52 PDT 2013
On Jun 29, 2013, at 7:00 AM, maurizio cimadamore wrote:
> This code:
>
> interface ApplicationListener<E extends ApplicationEvent> {
> void onApplicationEvent(E e);
> }
>
> class ApplicationEvent { }
>
> class Event1 extends ApplicationEvent { }
>
> class Test {
> public static <E extends ApplicationEvent> void register(ApplicationListener<E> listener) { }
> public void onEvent1(Event1 event1) { }
> public void initialize() {
> register(this::onEvent1);
> }
> }
>
> Works fine against the latest lambda compiler (after yesterday push).
Do you know approximately when this (and other recent) lambda changes will make their way into the standard JDK8 build at https://jdk8.java.net/download.html?
Thanks,
Nick
More information about the lambda-dev
mailing list