[FIR] KT-57095: Allow X? -> * assignments in unification
^KT-57095 Fixed Merge-request: KT-MR-9180 Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
9de86c03b7
commit
d639215084
+12
@@ -783,6 +783,18 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/QualifiedExpressions.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("rawCastToStarProjection_Fail.kt")
|
||||
public void testRawCastToStarProjection_Fail() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/rawCastToStarProjection_Fail.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("rawCastToStarProjection_Ok.kt")
|
||||
public void testRawCastToStarProjection_Ok() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/rawCastToStarProjection_Ok.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("RecursiveResolve.kt")
|
||||
public void testRecursiveResolve() throws Exception {
|
||||
|
||||
+12
@@ -783,6 +783,18 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/QualifiedExpressions.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("rawCastToStarProjection_Fail.kt")
|
||||
public void testRawCastToStarProjection_Fail() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/rawCastToStarProjection_Fail.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("rawCastToStarProjection_Ok.kt")
|
||||
public void testRawCastToStarProjection_Ok() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/rawCastToStarProjection_Ok.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("RecursiveResolve.kt")
|
||||
public void testRecursiveResolve() throws Exception {
|
||||
|
||||
@@ -78,7 +78,11 @@ fun FirSession.doUnify(
|
||||
}
|
||||
|
||||
// Foo ~ X? => fail
|
||||
if (originalType?.nullability != ConeNullability.NULLABLE && typeWithParameters?.nullability == ConeNullability.NULLABLE) {
|
||||
if (
|
||||
originalTypeProjection !is ConeStarProjection &&
|
||||
originalType?.nullability != ConeNullability.NULLABLE &&
|
||||
typeWithParameters?.nullability == ConeNullability.NULLABLE
|
||||
) {
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user