KT-10139:

Non-exhaustive 'when' without 'else' used in expression is an error
regardless of expected type: it can't be an expression, even of type Unit.
This commit is contained in:
Dmitry Petrov
2015-11-27 18:35:02 +03:00
parent 1a3a296827
commit 76931affc6
12 changed files with 38 additions and 80 deletions
@@ -8212,18 +8212,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("noElseAssigned.kt")
public void testNoElseAssigned() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseAssigned.kt");
doTest(fileName);
}
@TestMetadata("noElseAssignedNoMatch.kt")
public void testNoElseAssignedNoMatch() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseAssignedNoMatch.kt");
doTest(fileName);
}
@TestMetadata("noElseExhaustive.kt")
public void testNoElseExhaustive() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseExhaustive.kt");
@@ -8242,18 +8230,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
doTest(fileName);
}
@TestMetadata("noElseInRetunedExpression.kt")
public void testNoElseInRetunedExpression() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseInRetunedExpression.kt");
doTest(fileName);
}
@TestMetadata("noElseInRetunedExpressionNoMatch.kt")
public void testNoElseInRetunedExpressionNoMatch() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseInRetunedExpressionNoMatch.kt");
doTest(fileName);
}
@TestMetadata("noElseInStatement.kt")
public void testNoElseInStatement() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/when/noElseInStatement.kt");