RFR: 8325324: Implement Implicitly Declared Classes and Instance Main Methods (Third Preview)
Chen Liang
liach at openjdk.org
Wed Apr 17 14:41:59 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.SimpleIO.*;
>
>
> 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.SimpleIO`, including testing. Some tweaking may still be necessary when `java.io.SimpleIO` is introduced. 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.
>
> There is also an obvious relation to String Templates, which may need tweaking/simplification.
>
> Additional tweak will be needed once the JEP is Candidate, to updated the proper JEP number.
>
> [1] https://openjdk.org/jeps/8323335
This needs to update now that String Template is removed.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18633#issuecomment-2061421524
More information about the compiler-dev
mailing list