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

Fredrik Ohrstrom oehrstroem at gmail.com
Sat Aug 21 03:54:51 PDT 2010


2010/8/16 Paul Benedict <pbenedict at apache.org>:
> 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.

You do not need to use the same syntax to acquire a field reference
as a method reference.

Parentheses should not be made mandatory.

//Fredrik


More information about the lambda-dev mailing list