RFR: 8338981: Access to private classes should be permitted inside the permits clause of the enclosing top-level class [v8]

Vicente Romero vromero at openjdk.org
Fri Oct 4 18:05:37 UTC 2024


On Fri, 4 Oct 2024 08:50:53 GMT, Evemose <duke at openjdk.org> wrote:

>> Fix involves adding new flag to after context that indicates that currently resolved symbol is in permits clause
>
> Evemose has updated the pull request incrementally with one additional commit since the last revision:
> 
>   address reviews

test/langtools/tools/javac/sealed/PrivateMembersInPermitClause.java line 59:

> 57: 
> 58:     @Test
> 59:     public void givenPrivateClassInPermitsClause_whenCompiling_thenShouldCompile() throws Exception {

I would use shorter method names, you can probably add more details about what the test does using javadoc or an internal comment

test/langtools/tools/javac/sealed/PrivateMembersInPermitClause.java line 75:

> 73: 
> 74:     @Test
> 75:     public void givenPrivateClassOfOtherTopLevelClassInPermitsClause_whenCompiling_thenShouldFail() throws Exception {

this test is failing for me

test/langtools/tools/javac/sealed/PrivateMembersInPermitClause.java line 146:

> 144: 
> 145:     @Test
> 146:     public void givenPrivateClassInPermitsClause_whenThanCompilingOtherClassThatReferencesPrivateClassInPermitsClause_thenShouldFail() throws Exception {

this one is failing for me too

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20718#discussion_r1788101400
PR Review Comment: https://git.openjdk.org/jdk/pull/20718#discussion_r1788103398
PR Review Comment: https://git.openjdk.org/jdk/pull/20718#discussion_r1788104962


More information about the compiler-dev mailing list