RFR: 8345944: JEP 492: extending local class in a different static context should not be allowed

Vicente Romero vromero at openjdk.org
Wed Dec 11 14:42:42 UTC 2024


On Wed, 11 Dec 2024 11:29:33 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

> This PR fixes a couple of issues associated with the implementation of the new stricter checks for local class creation defined by JEP 492.
> There are two issues:
> * the new checks do not apply to _all_ local classes, especially those whose owner happens to be a _variable_;
> * the new checks do not apply when a class _extends_ a local class -- that's because javac only checks superclasses in the case the superclass is an _inner_ class

lgtm

-------------

Marked as reviewed by vromero (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22679#pullrequestreview-2495878316


More information about the compiler-dev mailing list