[Analysis API FIR] do not consider unresolved imports as unused in import optimizer
Otherwise, the import optimizer breaks incomplete code ^KTIJ-25034 fixed
This commit is contained in:
committed by
Space Team
parent
d9ca77f716
commit
15f19f324e
+54
@@ -133,12 +133,66 @@ public class FirStandaloneNormalAnalysisSourceModuleAnalysisApiImportOptimizerTe
|
||||
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedFunction.kt")
|
||||
public void testUnresolvedFunction() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/unresolvedFunction.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedFunctionStarImport.kt")
|
||||
public void testUnresolvedFunctionStarImport() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/unresolvedFunctionStarImport.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedProperty.kt")
|
||||
public void testUnresolvedProperty() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/unresolvedProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedType.kt")
|
||||
public void testUnresolvedType() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/unresolvedType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedTypeArgument.kt")
|
||||
public void testUnresolvedTypeArgument() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/unresolvedTypeArgument.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedTypeQualifier.kt")
|
||||
public void testUnresolvedTypeQualifier() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/unresolvedTypeQualifier.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedTypeQualifierConstructor.kt")
|
||||
public void testUnresolvedTypeQualifierConstructor() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/unresolvedTypeQualifierConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unresolvedViaImportAlias.kt")
|
||||
public void testUnresolvedViaImportAlias() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/unresolvedViaImportAlias.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unusedTypeHiddenByTypeParameter_invalidAsArgument.kt")
|
||||
public void testUnusedTypeHiddenByTypeParameter_invalidAsArgument() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/unusedTypeHiddenByTypeParameter_invalidAsArgument.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unusedUnresolvedImport.kt")
|
||||
public void testUnusedUnresolvedImport() throws Exception {
|
||||
runTest("analysis/analysis-api/testData/components/importOptimizer/analyseImports/referencesWithErrors/unusedUnresolvedImport.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("usedConstructor_invalidArguments.kt")
|
||||
public void testUsedConstructor_invalidArguments() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user