LVTI: as per spec upward projection couldn't have resulted in a '? extends' parameterization

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Oct 12 19:56:56 UTC 2017



On 12/10/17 18:53, Georgiy Rakov wrote:
> According to this error message javac assumes type of 'z' to be 
> Shell<? extends C1>. It seems that this is at least a cosmetic defect 
> since type of 'z' is Shell<?> as it's been clarified.
> Should a JBS issue be filed on javac for this reason?
Hi,
based on Dan's explanation this would seem as a cosmetic issue indeed. 
The compiler impl is based off an earlier version of this spec which did 
not include this rule. That said, I can't  think of a case in which the 
difference will be visible. As Dan said, Shell<?> will be captured and 
the capture variable it leads to will be the same, so membership-wise no 
difference can be observed.

Dan, can you think of cases in which some weird difference would pop up?

Maurizio


More information about the compiler-dev mailing list