Integrated: 8325324: Implement JEP 477: Implicitly Declared Classes and Instance Main Methods (Third Preview)
Jan Lahoda
jlahoda at openjdk.org
Thu May 23 09:46:08 UTC 2024
On Thu, 4 Apr 2024 16:36:58 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> This is an implementation of a change for JEP draft: Implicitly Declared Classes and Instance Main Methods (Third Preview)[1]. The primary change here is that implicitly declared classes have two new implicit imports:
>
> import module java.base;
> import static java.io.IO.*;
>
>
> Both of these depend on other changes, the first one on https://github.com/openjdk/jdk/pull/18614, and the second one on https://bugs.openjdk.org/browse/JDK-8305457. This PR depends on 18614, and the patch here can should be able to work both in the presence and absence of `java.io.IO`, including testing. But, overall the patch should be fairly straightforward - the imports are injected at the same time the long-existing import for `java.lang` is added.
>
> The JEP number if `jdk.internal.javac.PreviewFeature` will be adjusted once the JEP is moved to Candidate.
>
> [1] https://openjdk.org/jeps/8323335
This pull request has now been integrated.
Changeset: 4e6d851f
Author: Jan Lahoda <jlahoda at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/4e6d851f3f061b4a9c2b5d2e3fba6a0277ac1f34
Stats: 318 lines in 5 files changed: 313 ins; 2 del; 3 mod
8325324: Implement JEP 477: Implicitly Declared Classes and Instance Main Methods (Third Preview)
Reviewed-by: asotona, vromero, mcimadamore
-------------
PR: https://git.openjdk.org/jdk/pull/18633
More information about the compiler-dev
mailing list