[FIR] Fix IllegalStateException on broken import
#KT-55316 Fixed
This commit is contained in:
committed by
Space Team
parent
691a1a683f
commit
f18591ffef
+6
@@ -13544,6 +13544,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("brokenImport.kt")
|
||||
public void testBrokenImport() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/imports/brokenImport.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("CheckJavaVisibility.kt")
|
||||
public void testCheckJavaVisibility() throws Exception {
|
||||
|
||||
+6
@@ -13544,6 +13544,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("brokenImport.kt")
|
||||
public void testBrokenImport() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/imports/brokenImport.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("CheckJavaVisibility.kt")
|
||||
public void testCheckJavaVisibility() throws Exception {
|
||||
|
||||
+1
-1
@@ -112,7 +112,7 @@ class JvmDependenciesIndexImpl(_roots: List<JavaRoot>) : JvmDependenciesIndex {
|
||||
|
||||
private fun <T : Any> search(request: SearchRequest, handler: (VirtualFile, JavaRoot.RootType) -> T?): T? {
|
||||
// a list of package sub names, ["org", "jb", "kotlin"]
|
||||
val packagesPath = request.packageFqName.pathSegments().map { it.identifier }
|
||||
val packagesPath = request.packageFqName.pathSegments().map { it.identifierOrNullIfSpecial ?: return null }
|
||||
// a list of caches corresponding to packages, [default, "org", "org.jb", "org.jb.kotlin"]
|
||||
val caches = cachesPath(packagesPath)
|
||||
|
||||
|
||||
+6
@@ -13544,6 +13544,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("brokenImport.kt")
|
||||
public void testBrokenImport() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/imports/brokenImport.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("CheckJavaVisibility.kt")
|
||||
public void testCheckJavaVisibility() throws Exception {
|
||||
|
||||
+6
@@ -13550,6 +13550,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("brokenImport.kt")
|
||||
public void testBrokenImport() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/imports/brokenImport.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("CheckJavaVisibility.kt")
|
||||
public void testCheckJavaVisibility() throws Exception {
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
import foo.bar.baz
|
||||
import Outer.`<no name provided>`.getInner
|
||||
@@ -0,0 +1,2 @@
|
||||
import <!UNRESOLVED_REFERENCE!>foo<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>bar<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>baz<!>
|
||||
import <!UNRESOLVED_REFERENCE!>Outer<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>`<no name provided>`<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>getInner<!>
|
||||
Generated
+6
@@ -13550,6 +13550,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/imports/AllUnderImportsSamePriorityForProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("brokenImport.kt")
|
||||
public void testBrokenImport() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/imports/brokenImport.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("CheckJavaVisibility.kt")
|
||||
public void testCheckJavaVisibility() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user