RFR: 8335989: Implement Module Import Declarations (Second Preview) [v3]

Jan Lahoda jlahoda at openjdk.org
Wed Oct 23 13:13:20 UTC 2024


On Mon, 21 Oct 2024 11:03:44 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits:
>> 
>>  - Merge branch 'master' into JDK-8335989
>>  - Reflecting review feedback.
>>  - Cleanup.
>>  - Cleanup.
>>  - Fixing tests
>>  - Adding a separate scope for module imports.
>>  - Cleanup.
>>  - Make very sure java.base is completed.
>>  - Keep jdk.internal.javac qualified export from java.base.
>>  - Adding forgotten change.
>>  - ... and 5 more: https://git.openjdk.org/jdk/compare/15815089...b5f9df2a
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java line 1141:
> 
>> 1139:             return true;
>> 1140:         } else if (sym.kind == TYP && toplevel != null) {
>> 1141:             for (Scope scope : new Scope[] {toplevel.namedImportScope,
> 
> I wonder if we could deal with this with a compound scope? (and avoid the loop)

In principle, we could, but the `CompoundScope` is a bit heavier, so it might be better to keep the loop here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21431#discussion_r1812730863


More information about the core-libs-dev mailing list