Does JLS tell if this program is legal?

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu May 23 18:16:45 UTC 2024


On 23/05/2024 15:52, Dan Smith wrote:
>> Does javac already implement this application of projection?
> No, I don't believe so. The bug remains, it's something that needs to be addressed sometime.

Correct. We don't do anything fancy. And, javac is not very consistent 
in how supertypes are computed. In most occurrences, javac will happily 
replace wildcards in supertypes. In other cases javac might attempt to 
capture before going up.

Maurizio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/compiler-dev/attachments/20240523/e301e3f2/attachment.htm>


More information about the compiler-dev mailing list