[NI] Fix common supertype of types with error supertypes
Enable check for error supertypes during CST calculation in classic type system context. Cyclic upper bound + known type parameters of superclasses may create non-error types with error supertypes. Such types don't have common constructors with other normal types and cause assertion errors during intersection. ^KT-36951 Fixed
This commit is contained in:
@@ -10116,6 +10116,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali
|
||||
runTest("compiler/testData/diagnostics/tests/inference/commonSuperTypeOfErrorTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("commonSuperTypeOfTypesWithErrorSupertypes.kt")
|
||||
public void testCommonSuperTypeOfTypesWithErrorSupertypes() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/commonSuperTypeOfTypesWithErrorSupertypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compatibilityResolveWhenVariableHasComplexIntersectionType.kt")
|
||||
public void testCompatibilityResolveWhenVariableHasComplexIntersectionType() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/compatibilityResolveWhenVariableHasComplexIntersectionType.kt");
|
||||
|
||||
+5
@@ -3060,6 +3060,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt36249.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36951.kt")
|
||||
public void testKt36951() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt37627.kt")
|
||||
public void testKt37627() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt37627.kt");
|
||||
|
||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+5
@@ -3060,6 +3060,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt36249.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt36951.kt")
|
||||
public void testKt36951() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt36951.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt37627.kt")
|
||||
public void testKt37627() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt37627.kt");
|
||||
|
||||
Generated
+5
@@ -10111,6 +10111,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/inference/commonSuperTypeOfErrorTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("commonSuperTypeOfTypesWithErrorSupertypes.kt")
|
||||
public void testCommonSuperTypeOfTypesWithErrorSupertypes() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/commonSuperTypeOfTypesWithErrorSupertypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("compatibilityResolveWhenVariableHasComplexIntersectionType.kt")
|
||||
public void testCompatibilityResolveWhenVariableHasComplexIntersectionType() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inference/compatibilityResolveWhenVariableHasComplexIntersectionType.kt");
|
||||
|
||||
Reference in New Issue
Block a user