Descriptor computation in the presence of raw types ?

Srikanth S Adayapalam srikanth_sankaran at
Thu Feb 14 19:24:23 PST 2013

0.6.1 9.8 is silent about descriptor computation in the presence of raw 
Is this specified somewhere else ? Discouraged though this scenario may 
we can expect to run into this sooner or later, intentionally coded or 

The reference compiler at 8b74 seems to erase the descriptor as seen by 
following program: This seems reasonable from one pov. From another, this 
somewhat at odds with the ban on lambdas implementing generic methods in 
in both cases we have (or are likely to have) unadaptable type variable 
usage in
various constituents of the descriptor. And the target type is raw in one 
and the lambda is "raw" in the other case (by virtue of there being no 
support for type parameter encoding)

I am happy erasing the descriptor, but (a) should this stay unspecified if 
it indeed
is and (b) does the inconsistency in treatment with generic lambdas OK ?

Thanks in advance for clarifications.

// ---
import java.util.List;
interface I<T> {
    void foo(List<T> f);

class Y {
    void goo(I<String> f) {

class Z {
    void zoo(I f) {
public class X {
    public static void main(String [] args) {
       new Y().goo((List<String> ls) -> {});  // Compiles OK with 8b74
       new Z().zoo((List ls) -> {});          // OK
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the lambda-spec-experts mailing list