NI: don't do substitution for unsupported callable descriptors to use as callable references

^KT-41729 Fixed
This commit is contained in:
Victor Petukhov
2020-09-09 11:55:18 +03:00
parent 668098f3a8
commit 685d16ec68
27 changed files with 247 additions and 55 deletions
@@ -1784,11 +1784,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
runTest("compiler/testData/diagnostics/tests/callableReference/callableReferenceAsLastExpressionInBlock.kt");
}
@TestMetadata("callableReferenceToLocalVariable.kt")
public void testCallableReferenceToLocalVariable() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/callableReferenceToLocalVariable.kt");
}
@TestMetadata("classVsPackage.kt")
public void testClassVsPackage() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/classVsPackage.kt");
@@ -2555,11 +2550,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
runTest("compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt");
}
@TestMetadata("localVariable.kt")
public void testLocalVariable() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/property/localVariable.kt");
}
@TestMetadata("memberFromTopLevel.kt")
public void testMemberFromTopLevel() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/property/memberFromTopLevel.kt");
@@ -2580,11 +2570,6 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
runTest("compiler/testData/diagnostics/tests/callableReference/property/samePriorityForFunctionsAndProperties.kt");
}
@TestMetadata("syntheticProperties.kt")
public void testSyntheticProperties() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/property/syntheticProperties.kt");
}
@TestMetadata("topLevelFromTopLevel.kt")
public void testTopLevelFromTopLevel() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/property/topLevelFromTopLevel.kt");
@@ -2853,6 +2838,44 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
runTest("compiler/testData/diagnostics/tests/callableReference/resolve/withVararg.kt");
}
}
@TestMetadata("compiler/testData/diagnostics/tests/callableReference/unsupported")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Unsupported extends AbstractFirOldFrontendDiagnosticsTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
}
public void testAllFilesPresentInUnsupported() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/callableReference/unsupported"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);
}
@TestMetadata("callableReferenceToLocalVariable.kt")
public void testCallableReferenceToLocalVariable() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/callableReferenceToLocalVariable.kt");
}
@TestMetadata("localVariable.kt")
public void testLocalVariable() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/localVariable.kt");
}
@TestMetadata("localVariableWithSubstitution.kt")
public void testLocalVariableWithSubstitution() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/localVariableWithSubstitution.kt");
}
@TestMetadata("parameterWithSubstitution.kt")
public void testParameterWithSubstitution() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/parameterWithSubstitution.kt");
}
@TestMetadata("syntheticProperties.kt")
public void testSyntheticProperties() throws Exception {
runTest("compiler/testData/diagnostics/tests/callableReference/unsupported/syntheticProperties.kt");
}
}
}
@TestMetadata("compiler/testData/diagnostics/tests/cast")
@@ -2908,6 +2908,11 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/arrayConstructor.kt");
}
@TestMetadata("callableReferenceOnParameter.kt")
public void testCallableReferenceOnParameter() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/callableReferenceOnParameter.kt");
}
@TestMetadata("integerLiterals.kt")
public void testIntegerLiterals() throws Exception {
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/integerLiterals.kt");