Skip to content

Commit

Permalink
Make very sure java.base is completed.
Browse files Browse the repository at this point in the history
  • Loading branch information
lahodaj committed Oct 7, 2024
1 parent 5836e4f commit e24dde1
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,12 @@ public void initModules(List<JCCompilationUnit> trees) {

public boolean enter(List<JCCompilationUnit> trees, ClassSymbol c) {
Assert.check(rootModules != null || inInitModules || !allowModules);
return enter(trees, modules -> {}, c);
return enter(trees, modules -> {
//make sure java.base is completed in all cases before continuing.
//the next steps may query if the current module participates in preview,
//and that requires a completed java.base:
syms.java_base.complete();
}, c);
}

private boolean enter(List<JCCompilationUnit> trees, Consumer<Set<ModuleSymbol>> init, ClassSymbol c) {
Expand Down

0 comments on commit e24dde1

Please sign in to comment.