What is the motivation behind the descriptor visibility rules ?

Srikanth S Adayapalam srikanth_sankaran at in.ibm.com
Wed Feb 27 09:41:42 PST 2013

Hello !

        15.27.3 and 15.28.1 state:

It is a compile-time error if any class or interface mentioned by either 
or the descriptor of T' is not accessible from the class in which the 
expression appears.

        I would like to understand the motivation behind these rules. 
are more restrictive than a normal method overriding (lambda case) 
(under covariance return could be a visible subtype of an inaccessible 
return type in super method, thrown exceptions don't have be visible as 
as the subtype implementation does not want to throw them) 

This rule is also more restrictive than a method invocation scenario 
reference case) where even the parameter types need not be visible. 

I don't have a real case where this is hurting, but with jigsaw knocking 
at the doors,
I wonder if contours could emerge in different ways and there could be 
strange bed 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-spec-experts/attachments/20130227/1919b41a/attachment.html 

More information about the lambda-spec-experts mailing list