[NI] Make error CST when any of included types is error
`ErrorType` is not subtype of `Any`, so any set of types containing an `ErrorType` has no common super constructors. ^KT-36745 Fixed
This commit is contained in:
Generated
+5
@@ -9896,6 +9896,11 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("cstFromErrorAndNonErrorTypes.kt")
|
||||||
|
public void testCstFromErrorAndNonErrorTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/cstFromErrorAndNonErrorTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("dependOnExpectedType.kt")
|
@TestMetadata("dependOnExpectedType.kt")
|
||||||
public void testDependOnExpectedType() throws Exception {
|
public void testDependOnExpectedType() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/inference/dependOnExpectedType.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/dependOnExpectedType.kt");
|
||||||
|
|||||||
+1
-1
@@ -97,7 +97,7 @@ object NewCommonSuperTypeCalculator {
|
|||||||
contextStubTypesEqualToAnything: AbstractTypeCheckerContext,
|
contextStubTypesEqualToAnything: AbstractTypeCheckerContext,
|
||||||
contextStubTypesNotEqual: AbstractTypeCheckerContext
|
contextStubTypesNotEqual: AbstractTypeCheckerContext
|
||||||
): SimpleTypeMarker {
|
): SimpleTypeMarker {
|
||||||
if (types.all { it is ErrorType }) {
|
if (types.any { it is ErrorType }) {
|
||||||
return ErrorUtils.createErrorType("CST(${types.joinToString()}")
|
return ErrorUtils.createErrorType("CST(${types.joinToString()}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
run {
|
||||||
|
if (true)
|
||||||
|
return@run false
|
||||||
|
<!UNRESOLVED_REFERENCE!>unresolved<!>.toString()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
run {
|
||||||
|
if (true)
|
||||||
|
return@run false
|
||||||
|
<!UNRESOLVED_REFERENCE!>unresolved<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>toString<!>()
|
||||||
|
}
|
||||||
|
}
|
||||||
+3
@@ -0,0 +1,3 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public fun test(): kotlin.Unit
|
||||||
@@ -9903,6 +9903,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("cstFromErrorAndNonErrorTypes.kt")
|
||||||
|
public void testCstFromErrorAndNonErrorTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/cstFromErrorAndNonErrorTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("dependOnExpectedType.kt")
|
@TestMetadata("dependOnExpectedType.kt")
|
||||||
public void testDependOnExpectedType() throws Exception {
|
public void testDependOnExpectedType() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/inference/dependOnExpectedType.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/dependOnExpectedType.kt");
|
||||||
|
|||||||
Generated
+5
@@ -9898,6 +9898,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
|||||||
runTest("compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("cstFromErrorAndNonErrorTypes.kt")
|
||||||
|
public void testCstFromErrorAndNonErrorTypes() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/inference/cstFromErrorAndNonErrorTypes.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("dependOnExpectedType.kt")
|
@TestMetadata("dependOnExpectedType.kt")
|
||||||
public void testDependOnExpectedType() throws Exception {
|
public void testDependOnExpectedType() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/inference/dependOnExpectedType.kt");
|
runTest("compiler/testData/diagnostics/tests/inference/dependOnExpectedType.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user