[FIR] Add proper constraint if Unit upper bound leads to Unit lambda return type

#KT-63524 Fixed
This commit is contained in:
Kirill Rakhman
2023-12-11 10:13:39 +01:00
committed by Space Team
parent ce4eecebf4
commit 8a863e00ba
9 changed files with 46 additions and 6 deletions
@@ -17058,6 +17058,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/inference/underscoredTypeInForbiddenPositions.kt");
}
@Test
@TestMetadata("UnitUpperboundLambdaReturnType.kt")
public void testUnitUpperboundLambdaReturnType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/UnitUpperboundLambdaReturnType.kt");
}
@Test
@TestMetadata("unsoundness1.kt")
public void testUnsoundness1() throws Exception {
@@ -17058,6 +17058,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/inference/underscoredTypeInForbiddenPositions.kt");
}
@Test
@TestMetadata("UnitUpperboundLambdaReturnType.kt")
public void testUnitUpperboundLambdaReturnType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/UnitUpperboundLambdaReturnType.kt");
}
@Test
@TestMetadata("unsoundness1.kt")
public void testUnsoundness1() throws Exception {