hg: lambda/lambda/langtools: Next round of implementation reflecting the latest 'State of the Lambda' draft; implemented features are:

Neal Gafter neal at gafter.com
Fri Jul 23 10:11:30 PDT 2010


On Fri, Jul 23, 2010 at 8:02 AM, Maurizio Cimadamore <
maurizio.cimadamore at oracle.com> wrote:

> On 23/07/10 14:48, Neal Gafter wrote:
>
>> Maurizio-
>>
>> The test cases do not illustrate what happens in the presence of
>> overloading.
>>
> These two tests:
>
> + test/tools/javac/lambda/TargetType01.java (negative test)
> + test/tools/javac/lambda/TargetType02.java (positive test)
>
>
> Show an example of target typing with overloading.
>
>    Does the language treat overloaded method resolution and non-overloaded
>> method resolution differently?
>>
>>
> What do you mean?
>

Just what I asked.  For example, what is the type of "this" inside the
lambda in TargetType02?  I cannot tell from the specification nor from the
test cases provided.  Is the invocation of toString() qualified (by an
anonymous subtype of S1) in the generated bytecode as required by the JLS?
The comment in TargetType01 is mysterious ("ambiguity here - the compiler
does not try all the combinations!"): this code would be ambiguous whether
or not the compiler is required to "try all combinations".  However, it
isn't clear from the specification or the test cases what would happen in
cases where this comment would be meaningful.

To put it another way, are there any plans to document the language rules
that you've provided an implementation of?


More information about the lambda-dev mailing list