Convert to expression body is forbidden on single non-exhaustive when statement with Unit result #KT-12502 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-05-27 13:33:14 +03:00
parent 91ce8cc612
commit 2350caf177
7 changed files with 68 additions and 2 deletions
@@ -4591,6 +4591,24 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
doTest(fileName);
}
@TestMetadata("whenUnitExhaustive.kt")
public void testWhenUnitExhaustive() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToExpressionBody/whenUnitExhaustive.kt");
doTest(fileName);
}
@TestMetadata("whenUnitNonExhaustive.kt")
public void testWhenUnitNonExhaustive() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToExpressionBody/whenUnitNonExhaustive.kt");
doTest(fileName);
}
@TestMetadata("whenUnitWithElse.kt")
public void testWhenUnitWithElse() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToExpressionBody/whenUnitWithElse.kt");
doTest(fileName);
}
@TestMetadata("while.kt")
public void testWhile() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToExpressionBody/while.kt");