Skip to content

Commit

Permalink
Add a regression test for b/231734064
Browse files Browse the repository at this point in the history
Already fixed by an earlier fix, but a regression test for this specific odd case is nice to have.

PiperOrigin-RevId: 499165131
  • Loading branch information
graememorgan authored and Error Prone Team committed Jan 3, 2023
1 parent eb91345 commit a3005b1
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,4 +496,21 @@ public void effectivelyPrivateMethodMadeVisible() {
"}")
.doTest();
}

@Test
public void effectivelyPrivateMethodMadeVisible_bySubclassImplementingPublicInterface() {
helper
.addSourceLines(
"Test.java",
"class Test {",
" private static class A {",
" public void a() {}",
" }",
" public interface B {",
" public void a();",
" }",
" public static final class C extends A implements B {}",
"}")
.doTest();
}
}

0 comments on commit a3005b1

Please sign in to comment.