RFR: 8325324: Implement Implicitly Declared Classes and Instance Main Methods (Third Preview) [v3]
Vicente Romero
vromero at openjdk.org
Thu May 2 12:52:54 UTC 2024
On Thu, 2 May 2024 06:10:21 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
>
> Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 14 commits:
>
> - Fixing typo.
> - Adjusting IO class name.
> - Merge branch 'module-imports' into JDK-8325324
> - Merge branch 'module-imports' into JDK-8325324
> - Merge branch 'module-imports' into JDK-8325324
> - Merge branch 'module-imports' into JDK-8325324
> - Adding test verifying that the new implicit imports are not used for ordinary classes.
> - Merge branch 'module-imports' into JDK-8325324
> - Fixing test.
> - Merge branch 'master' into JDK-8325324
> - ... and 4 more: https://git.openjdk.org/jdk/compare/43a1e0f6...a37f8d27
lgtm
-------------
Marked as reviewed by vromero (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/18633#pullrequestreview-2035656351
More information about the compiler-dev
mailing list