[sealed] Sealed local classes?
Remi Forax
forax at univ-mlv.fr
Fri Oct 25 14:16:06 UTC 2019
If you see sealed types in isolation yes,
but once you think that the compiler will check exhaustiveness of a switch using those names, the names has to be stable and human readable.
Remi
On October 25, 2019 10:34:04 AM UTC, Peter Levart <peter.levart at gmail.com> wrote:
>
>
>On 10/10/19 12:13 AM, Remi Forax wrote:
>> I agree, PermittedSubtypes should only contain stable names :)
>
>Well, since inference always happens inside a compilation unit, even
>"unstable" names are OK as all the classes in compilation unit are
>(re)compiled together.
>
>
>Regards, Peter
>
>>
>> Rémi
>>
>> ----- Mail original -----
>>> De: "Brian Goetz" <brian.goetz at oracle.com>
>>> À: "amber-spec-experts" <amber-spec-experts at openjdk.java.net>
>>> Envoyé: Mercredi 9 Octobre 2019 23:35:48
>>> Objet: Re: [sealed] Sealed local classes?
>>>> Proposal: ban `sealed` and `non-sealed` modifiers on _local_
>classes
>>>> and interfaces.
>>> And we would want to extend the ban we have for the other two forms
>of
>>> "subclasses inside implementations", lambdas and inner classes, to
>local
>>> classes.
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/amber-spec-experts/attachments/20191025/60d45118/attachment.html>
More information about the amber-spec-experts
mailing list