Skip to content

Commit 6f265dd

Browse files
cushonError Prone Team
authored and
Error Prone Team
committed
Add a disabled regression test for an UnusedVariable bug
#4409 PiperOrigin-RevId: 637894916
1 parent 5eded87 commit 6f265dd

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

core/src/test/java/com/google/errorprone/bugpatterns/UnusedVariableTest.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,4 +1655,29 @@ public void unusedFunctionalInterfaceParameter_noFix() {
16551655
.expectUnchanged()
16561656
.doTest();
16571657
}
1658+
1659+
@Ignore("https://github.com/google/error-prone/issues/4409")
1660+
@Test
1661+
public void parameterUsedInOverride() {
1662+
refactoringHelper
1663+
.addInputLines(
1664+
"App.java",
1665+
"public class App {",
1666+
" private static class Base {",
1667+
" protected void doStuff(String usedInDescendants) {}",
1668+
" }",
1669+
" private static class Descendant extends Base {",
1670+
" @Override",
1671+
" protected void doStuff(String actuallyUsed) {",
1672+
" System.out.println(actuallyUsed);",
1673+
" }",
1674+
" }",
1675+
" public static void main(String[] args) {",
1676+
" Base b = new Descendant();",
1677+
" b.doStuff(\"some string\");",
1678+
" }",
1679+
"}")
1680+
.expectUnchanged()
1681+
.doTest();
1682+
}
16581683
}

0 commit comments

Comments
 (0)