KT-10139: any if without else used in expression is an error
regardless of expected type: it can't be an expression, even of type Unit. #KT-10139 Fixed
This commit is contained in:
@@ -3282,6 +3282,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("ifWhenWithoutElse.kt")
|
||||
public void testIfWhenWithoutElse() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("improperElseInExpression.kt")
|
||||
public void testImproperElseInExpression() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt");
|
||||
|
||||
Reference in New Issue
Block a user