[FIR] Unregister java element finders from previous sessions
The problem here is that for common session we register `FirJavaElementFinder` which provides light classes based on expect classes. And then at the start of analysis of jvm module we register one another `FirJavaElementFinder`, which sees actual classes and uses them to build light classes But, because class ids of expect and actual class pair are the same and element finders are ordered by creation order, when java resolve tries to resolve some class, it founds light class based on expect class, even if we are already in platform session To fix this problem, it was decided to unregister all previous element finders on creation of each new session, so old finders won't interfere with analysis ^KT-63612 Fixed ^KT-64296
This commit is contained in:
committed by
Space Team
parent
e58b5e7d22
commit
f4e3203cd8
+6
@@ -35247,6 +35247,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/internalOverride2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaClassReferencedActualType.kt")
|
||||
public void testJavaClassReferencedActualType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/javaClassReferencedActualType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaMethodWithTypeParameter.kt")
|
||||
public void testJavaMethodWithTypeParameter() throws Exception {
|
||||
|
||||
+6
@@ -35247,6 +35247,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/internalOverride2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaClassReferencedActualType.kt")
|
||||
public void testJavaClassReferencedActualType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/multiplatform/k2/javaClassReferencedActualType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaMethodWithTypeParameter.kt")
|
||||
public void testJavaMethodWithTypeParameter() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user