Do not force coercion to Unit for nullable lambda return type

#KT-41005 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-08-11 23:17:01 +03:00
parent d9bac4d5e4
commit aafe41cf7a
10 changed files with 86 additions and 1 deletions
@@ -13694,6 +13694,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/inference/capturedStarProjection.kt");
}
@TestMetadata("coercionToUnitForLambdaReturnTypeWithFlexibleConstraint.kt")
public void testCoercionToUnitForLambdaReturnTypeWithFlexibleConstraint() throws Exception {
runTest("compiler/testData/codegen/box/inference/coercionToUnitForLambdaReturnTypeWithFlexibleConstraint.kt");
}
@TestMetadata("coercionToUnitWithLastLambdaExpression.kt")
public void testCoercionToUnitWithLastLambdaExpression() throws Exception {
runTest("compiler/testData/codegen/box/inference/coercionToUnitWithLastLambdaExpression.kt");
@@ -13754,6 +13759,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/inference/lastExpressionOfLambdaWithNothingConstraint.kt");
}
@TestMetadata("noCoercionToUniForNullableLambdaReturnType.kt")
public void testNoCoercionToUniForNullableLambdaReturnType() throws Exception {
runTest("compiler/testData/codegen/box/inference/noCoercionToUniForNullableLambdaReturnType.kt");
}
@TestMetadata("noNothingValueInsideSpecialCall.kt")
public void testNoNothingValueInsideSpecialCall() throws Exception {
runTest("compiler/testData/codegen/box/inference/noNothingValueInsideSpecialCall.kt");