Fallback to Any type in case supertypes are empty
This can happen e.g. if all supertypes were on the cycle (A : B, B : A) -- then SupertypesLoopChecker will cut all supertypes that are on cycle, leaving set of supertypes empty. Some clients in the compiler are not ready to work with empty list of supertypes -- notably, CommonSupertypes. ^KT-23029 Fixed
This commit is contained in:
@@ -4796,6 +4796,18 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("commonSupertypeForCyclicAndUsualTypes.kt")
|
||||
public void testCommonSupertypeForCyclicAndUsualTypes() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicAndUsualTypes.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("commonSupertypeForCyclicTypes.kt")
|
||||
public void testCommonSupertypeForCyclicTypes() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicTypes.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("cyclicHierarchy.kt")
|
||||
public void testCyclicHierarchy() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/cyclicHierarchy/cyclicHierarchy.kt");
|
||||
|
||||
Reference in New Issue
Block a user