Type Annotations and Lambda
wdietl at gmail.com
Tue Feb 5 14:19:41 PST 2013
I implemented method and constructor reference type arguments
CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT) in this changeset:
This resolves the crash noticed by Steve and implements correct
More extensive tests would be great. I no longer manage to crash the
compiler with any type annotation uses in lambda.
I am waiting on a specification clarification from Mike and/or Alex
about METHOD_REFERENCE_RECEIVER and CONSTRUCTOR_REFERENCE_RECEIVER.
To me these don't look like type uses, but instead only like scoping
mechanisms, for which we don't support type annotations.
It would be great to see a few examples of type uses for these and
what the interpretation of type annotations should be.
Finally, the spec says that type annotations in the signature or body
of a lambda expression should appear in the method that results from
I was hoping that this would work without any special effort. However,
no type annotations appear in a translated method.
Could somebody point me to the location in the code that translates a
lambda expression into a method?
More information about the type-annotations-dev