Local classes and static members?

Archie Cobbs archie.cobbs at gmail.com
Fri Jun 14 22:50:13 UTC 2024


Answering my own question...

It's a dumb question because it's no longer true. Originally local classes
could not have static members but that changed in JDK 16 with JDK-8254321
<https://bugs.openjdk.org/browse/JDK-8254321>.

-Archie

On Fri, Jun 14, 2024 at 3:52 PM Archie Cobbs <archie.cobbs at gmail.com> wrote:

> Dumb question...
>
> Where is it specified in the JLS that a (normal) local class cannot have
> static members? I don't see it in §14.3
> <https://docs.oracle.com/javase/specs/jls/se22/html/jls-14.html#jls-14.3>.
>
> Thanks.
>
> --
> Archie L. Cobbs
>


-- 
Archie L. Cobbs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-spec-experts/attachments/20240614/8a76f537/attachment.htm>


More information about the amber-spec-experts mailing list