[FIR] 1/2 match and check expect fake-overrides vs actuals
^KT-63550 Fixed Review: https://jetbrains.team/p/kt/reviews/13094/timeline Now it's required to create a new ScopeSession when searching for expect members for actuals. If you keep reusing actualScopeSession then members declared in platform may "slip into" the search results, resulting an incorrect expect for actual (e.g. it happens in supertypeIsExpectActual_covariantOverrideOfInjectedFromSuper_transitiveSubstitutionFakeOverride.fir.kt) I suppose that it always has been a bug that we reused actualScopeSession because we were mixing actualScopeSession and expect FirSession (which is a bad idea), but we simply didn't have cases where this bug could be observed. Now after we started matching fake-overrides, we have such cases. But creating a new ScopeSession every time is a suboptimal solution. We need to design a scope caching KT-63773
This commit is contained in:
+6
@@ -23707,6 +23707,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/actualFakeOverride_transitiveFakeOverrides_incompatible.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("actualTypealiasForNotExpectClass.kt")
|
||||
public void testActualTypealiasForNotExpectClass() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/actualTypealiasForNotExpectClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("actualTypealiasToSpecialAnnotation.kt")
|
||||
public void testActualTypealiasToSpecialAnnotation() throws Exception {
|
||||
|
||||
+6
@@ -23707,6 +23707,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/actualFakeOverride_transitiveFakeOverrides_incompatible.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("actualTypealiasForNotExpectClass.kt")
|
||||
public void testActualTypealiasForNotExpectClass() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/multiplatform/actualTypealiasForNotExpectClass.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("actualTypealiasToSpecialAnnotation.kt")
|
||||
public void testActualTypealiasToSpecialAnnotation() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user