hg: lambda/lambda/langtools: Added basic support for constructor references.
brian.goetz at oracle.com
Mon Jan 17 09:56:00 PST 2011
If you mean field references, yes, this was already discussed. It was
decided that this was outside the scope of Lambda.
(question for you to think on: what would the type of a field reference
> This has probably been discussed already, but since there are
> Methods and Constructor references, any chances to have Attribute
> Paulo Silveira
> Caelum | Ensino e Inovação
> 2011/1/17 Rémi Forax<forax at univ-mlv.fr>:
>> Cool !
>> Le 17/01/2011 15:36, maurizio.cimadamore at oracle.com a écrit :
>>> Changeset: 9a616df38d88
>>> Author: mcimadamore
>>> Date: 2011-01-17 14:34 +0000
>>> URL: http://hg.openjdk.java.net/lambda/lambda/langtools/rev/9a616df38d88
>>> Added basic support for constructor references.
>>> Syntax is as follows:
>>> ClassName [optionalTypeArgs] '#' 'new' [optionalArgs]
>>> Foo#new -> (*)Foo [most specific constructor]
>>> Foo#new() -> ()Foo
>>> Foo#new("Hello!") -> (String)Foo
>>> Foo<String>#new("Hello!") -> (String)Foo<String>
>>> ! src/share/classes/com/sun/tools/javac/comp/Attr.java
>>> ! src/share/classes/com/sun/tools/javac/comp/Lower.java
>>> ! src/share/classes/com/sun/tools/javac/parser/JavacParser.java
>>> + test/tools/javac/lambda/MethodReference17.java
>>> + test/tools/javac/lambda/MethodReference18.java
>>> + test/tools/javac/lambda/MethodReference19.java
>>> + test/tools/javac/lambda/MethodReference20.java
>>> + test/tools/javac/lambda/MethodReference20.out
More information about the lambda-dev