hg: lambda/lambda/langtools: Non-static selectors in method refs, such as instance creation expressions, should be handled correctly (prepended to argument list).

Paul Benedict pbenedict at apache.org
Mon Aug 16 08:25:21 PDT 2010


Maurizio,

In the MethodReference10 example, main() has this call:
sortBy(c, new Foo()#getA);

Has there been any further thought to making parentheses mandatory?
sortBy(c, new Foo()#getA(Foo));

... that is, to facilitate the language extending to field references.

Paul

On Mon, Aug 16, 2010 at 5:01 AM, <maurizio.cimadamore at oracle.com> wrote:

> Changeset: c3232ad98c72
> Author:    mcimadamore
> Date:      2010-08-16 11:00 +0100
> URL:
> http://hg.openjdk.java.net/lambda/lambda/langtools/rev/c3232ad98c72
>
> Non-static selectors in method refs, such as instance creation expressions,
> should be handled correctly (prepended to argument list).
>
> ! src/share/classes/com/sun/tools/javac/comp/Attr.java
> ! src/share/classes/com/sun/tools/javac/jvm/Gen.java
> ! src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
> ! test/tools/javac/lambda/MethodReference09.out
> + test/tools/javac/lambda/MethodReference10.java
>
>
>


More information about the lambda-dev mailing list