Don't report suspicious callable reference on invoke with parameters

So #KT-23465 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-04-17 12:17:04 +03:00
committed by Mikhail Glukhikh
parent 13356d32fd
commit b5da48c566
3 changed files with 19 additions and 2 deletions
@@ -2549,6 +2549,11 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/it.kt");
}
@TestMetadata("lambdaInvoke.kt")
public void testLambdaInvoke() throws Exception {
runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/lambdaInvoke.kt");
}
@TestMetadata("lambdaWithArg.kt")
public void testLambdaWithArg() throws Exception {
runTest("idea/testData/inspectionsLocal/moveSuspiciousCallableReferenceIntoParentheses/lambdaWithArg.kt");
@@ -3121,14 +3126,17 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class RedundantSamConstructor extends AbstractLocalInspectionTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInRedundantSamConstructor() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/inspectionsLocal/redundantSamConstructor"), Pattern.compile("^([\\w\\-_]+)\\.(kt|kts)$"), TargetBackend.ANY, true);
}
@TestMetadata("nestedInterface.kt")
public void testNestedInterface() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/inspectionsLocal/redundantSamConstructor/nestedInterface.kt");
doTest(fileName);
runTest("idea/testData/inspectionsLocal/redundantSamConstructor/nestedInterface.kt");
}
}