Convert to block body: when expression with Unit result is now handled as "return needed" #KT-12193 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-05-23 11:06:27 +03:00
parent 9a69b8b7b5
commit fa5e284bf8
6 changed files with 64 additions and 1 deletions
@@ -4225,6 +4225,12 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
doTest(fileName);
}
@TestMetadata("ifWhenUnit.kt")
public void testIfWhenUnit() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/ifWhenUnit.kt");
doTest(fileName);
}
@TestMetadata("implicitlyNonUnitFun.kt")
public void testImplicitlyNonUnitFun() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/implicitlyNonUnitFun.kt");
@@ -4284,6 +4290,12 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/valueIsAnonymousObject4.kt");
doTest(fileName);
}
@TestMetadata("whenUnit.kt")
public void testWhenUnit() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/convertToBlockBody/whenUnit.kt");
doTest(fileName);
}
}
@TestMetadata("idea/testData/intentions/convertToConcatenatedString")