Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] Lambda-Compilation fails on b105

Hello !

https://bugs.eclipse.org/bugs/show_bug.cgi?id=416885  is fixed, so you should
be able to test.

As noted earlier, two major projects (a) overload resolution and (b) type reference are
still in the works. These projects are to some extent blocked on spec - many relevant
parts of the specification particularly for (b) (and we also know (a) is undergoing change)
is still unfinished - We have been advised to expect a refreshed specification next week,
so work should resume full speed there too.

Srikanth

jdt-core-dev-bounces@xxxxxxxxxxx wrote on 09/06/2013 02:01:53 AM:

> From: Tom Schindl <tom.schindl@xxxxxxxxxxxxxxx>

> To: jdt-core-dev@xxxxxxxxxxx,
> Date: 09/06/2013 02:00 AM
> Subject: Re: [jdt-core-dev] Lambda-Compilation fails on b105
> Sent by: jdt-core-dev-bounces@xxxxxxxxxxx
>
> The title is wrong its not that the compilation fails but the generated
> bytecode does not work at runtime ;-)
>
> Tom
>
> On 05.09.13 22:22, Tom Schindl wrote:
> > Hi,
> >
> > After having managed to build BETA8 using CBI I see that Lambdas are
> > compiled in a way that they don't work with the latest java8 builds.
> >
> > Running this app:
> >
> >> import java.util.Arrays;
> >> import java.util.List;
> >>
> >> public class LamdaTest {
> >>    public static void main(String[] args) {
> >>       List<String> collection = Arrays.asList("A","B","C");
> >>       collection.forEach((s) -> System.out.println(s));
> >>    }
> >> }
> >
> >
> > fails with
> >
> >> Exception in thread "main" java.lang.IncompatibleClassChangeError
> >>    at
> java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant
> (MethodHandleNatives.java:383)
> >>    at LamdaTest.main(LamdaTest.java:8)
> >> Caused by: java.lang.NoSuchMethodException: no such method:
> java.lang.invoke.LambdaMetafactory.metaFactory
> (Lookup,String,MethodType,MethodHandle,MethodHandle,MethodType)
> CallSite/invokeStatic
> >>    at java.lang.invoke.MemberName.makeAccessException(MemberName.java:765)
> >>    at java.lang.invoke.MemberName$Factory.resolveOrFail
> (MemberName.java:882)
> >>    at java.lang.invoke.MethodHandles$Lookup.resolveOrFail
> (MethodHandles.java:1019)
> >>    at java.lang.invoke.MethodHandles
> $Lookup.linkMethodHandleConstant(MethodHandles.java:1284)
> >>    at
> java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant
> (MethodHandleNatives.java:381)
> >>    ... 1 more
> >> Caused by: java.lang.NoSuchMethodError:
> java.lang.invoke.LambdaMetafactory.metaFactory(Ljava/lang/invoke/
> MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/
> MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/
> MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite;
> >>    at java.lang.invoke.MethodHandleNatives.resolve(Native Method)
> >>    at java.lang.invoke.MemberName$Factory.resolve(MemberName.java:854)
> >>    at java.lang.invoke.MemberName$Factory.resolveOrFail
> (MemberName.java:879)
> >>    ... 4 more
> >
> > It looks like the signature of LambdaMetafactory.metaFactory changed to
> >
> > Lookup,String,MethodType,MethodType,MethodHandle,MethodType
> >
> > and you generate
> >
> > Lookup,String,MethodType,MethodHandle,MethodHandle,MethodType
> >
> > Tom
> > _______________________________________________
> > jdt-core-dev mailing list
> > jdt-core-dev@xxxxxxxxxxx
> >
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
> >
>
> _______________________________________________
> jdt-core-dev mailing list
> jdt-core-dev@xxxxxxxxxxx
>
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev
>

Back to the top