[NI] Fix coercion to Unit for lambdas with empty labeled return

This commit is contained in:
Mikhail Zarechenskiy
2019-01-29 15:37:27 +03:00
parent 147d7844bc
commit 6705803d83
7 changed files with 136 additions and 2 deletions
@@ -9710,6 +9710,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/coercionToUnit"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("coercionToUnitForIfAsLastExpressionInLambda.kt")
public void testCoercionToUnitForIfAsLastExpressionInLambda() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionToUnitForIfAsLastExpressionInLambda.kt");
}
@TestMetadata("coercionWithExpectedType.kt")
public void testCoercionWithExpectedType() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionWithExpectedType.kt");
@@ -9739,6 +9744,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
public void testNoCoercion() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/noCoercion.kt");
}
@TestMetadata("nonPropagationOfCoercionToUnitInsideNestedLambda.kt")
public void testNonPropagationOfCoercionToUnitInsideNestedLambda() throws Exception {
runTest("compiler/testData/diagnostics/tests/inference/coercionToUnit/nonPropagationOfCoercionToUnitInsideNestedLambda.kt");
}
}
@TestMetadata("compiler/testData/diagnostics/tests/inference/commonSystem")