Recursion depth in CommonSupertypes is bounded by maxDepth + 3
This commit is contained in:
@@ -3763,6 +3763,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("commonSupertype.kt")
|
||||
public void testCommonSupertype() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/commonSupertype.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("dontCreatePackageTypeForEnumEntry.kt")
|
||||
public void testDontCreatePackageTypeForEnumEntry() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry.kt");
|
||||
@@ -4437,6 +4443,11 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("recursive.kt")
|
||||
public void testRecursive() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/generics/recursive.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("RecursiveUpperBoundCheck.kt")
|
||||
public void testRecursiveUpperBoundCheck() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/generics/RecursiveUpperBoundCheck.kt");
|
||||
@@ -7763,6 +7774,11 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("recursiveGeneric.kt")
|
||||
public void testRecursiveGeneric() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/recursiveGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stringOrNull.kt")
|
||||
public void testStringOrNull() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/platformTypes/commonSupertype/stringOrNull.kt");
|
||||
|
||||
@@ -204,6 +204,10 @@ public class JetTypeCheckerTest extends JetLiteFixture {
|
||||
assertCommonSupertype("Base_T<out Parent>", "Base_T<A>", "Base_T<B>");
|
||||
}
|
||||
|
||||
public void testCommonSupertypesForRecursive() throws Exception {
|
||||
assertCommonSupertype("Rec<out Rec<out Rec<out Rec<out Rec<out Any?>>>>>", "ARec", "BRec");
|
||||
}
|
||||
|
||||
public void testIntersect() throws Exception {
|
||||
assertIntersection("Long", "Long?", "Number");
|
||||
assertIntersection("Long", "Number", "Long?");
|
||||
|
||||
Reference in New Issue
Block a user