Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] Generic signature for Lambda Expressions

Please raise a bug and we will take a look at it. The stopping of emission of
generic signatures was not essential to the fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=436542.
Upon noticing that javac does not emit, we also chose to stop emitting them.

No hard promises yet, but we can reconsider this decision and if deemed harmless
after full analysis, restore the behavior for M4.

Thanks!
Srikanth


jdt-core-dev-bounces@xxxxxxxxxxx wrote on 10/28/2014 04:52:04 PM:

> From: Timo Walther <flink@xxxxxxxxxxx>

> To: jdt-core-dev@xxxxxxxxxxx
> Date: 10/28/2014 04:48 PM
> Subject: [jdt-core-dev] Generic signature for Lambda Expressions
> Sent by: jdt-core-dev-bounces@xxxxxxxxxxx
>
> Hi all,
>
> I'm working for the Apache Flink project. With our upcoming release
> we wanted to support Lambda Expressions and relied on a feature that
> only the Eclipse JDT compiler had so far: Lambda Expressions which
> contain a generic signature, in order to be type-safe. Before the
> patch for Bug 436542 was merged, we could extract type information
> from code like:
>
> public class Test {
>     public static interface Map<IN, OUT> {
>         public OUT map(IN in);
>     }
>
>     public static class Tuple<T1, T2> {
>         private T1 field1;
>         private T2 field2;
>     }
>
>     public static void main(String[] strings) throws Exception {
>         Map<Tuple<String, Double>, Tuple<Integer, String>> map =
> (in) -> new Tuple<>();
>         MyTypeInfo ti = extract(map);
>     }
> }
>
> by using the solution described here:
http://stackoverflow.com/
> questions/21887358/reflection-type-inference-on-java-8-lambdas
>
> My question is: Why does the method_info of a synthetic lambda$xxx
> method does not contain a generic signature anymore? It was a very
> valuable feature.
>
> Regards,
> Timo
>
>
>
> _______________________________________________
> jdt-core-dev mailing list
> jdt-core-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or
> unsubscribe from this list, visit
>
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev

Back to the top