Skip to content

Commit

Permalink
Add a disabled regression test for an UnusedVariable bug
Browse files Browse the repository at this point in the history
#4409

PiperOrigin-RevId: 637894916
  • Loading branch information
cushon authored and Error Prone Team committed May 28, 2024
1 parent 5eded87 commit 6f265dd
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1655,4 +1655,29 @@ public void unusedFunctionalInterfaceParameter_noFix() {
.expectUnchanged()
.doTest();
}

@Ignore("https://github.com/google/error-prone/issues/4409")
@Test
public void parameterUsedInOverride() {
refactoringHelper
.addInputLines(
"App.java",
"public class App {",
" private static class Base {",
" protected void doStuff(String usedInDescendants) {}",
" }",
" private static class Descendant extends Base {",
" @Override",
" protected void doStuff(String actuallyUsed) {",
" System.out.println(actuallyUsed);",
" }",
" }",
" public static void main(String[] args) {",
" Base b = new Descendant();",
" b.doStuff(\"some string\");",
" }",
"}")
.expectUnchanged()
.doTest();
}
}

0 comments on commit 6f265dd

Please sign in to comment.