hg: lambda/lambda/langtools: Non-static selectors in method refs, such as instance creation expressions, should be handled correctly (prepended to argument list).
maurizio.cimadamore at oracle.com
Mon Aug 16 08:48:33 PDT 2010
On 16/08/10 16:25, Paul Benedict wrote:
> 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.
Field references are an explicit non-priority for the forseeable
future. Said that, we are being careful to choose a syntax and
semantics that do not foreclose on the possibility of supporting field
references in the future.
> On Mon, Aug 16, 2010 at 5:01 AM, <maurizio.cimadamore at oracle.com
> <mailto:maurizio.cimadamore at oracle.com>> wrote:
> Changeset: c3232ad98c72
> Author: mcimadamore
> Date: 2010-08-16 11:00 +0100
> 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