"Eliminate argument of 'when'": do not suggest if 'when' is used as expression and it has no 'else' branch (#2898)

#KT-35526 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-08-19 18:24:58 +09:00
committed by GitHub
parent d965ad0a98
commit 8ba5548a0f
5 changed files with 51 additions and 1 deletions
@@ -3267,6 +3267,16 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
public void testWhenWithoutSubject() throws Exception {
runTest("idea/testData/intentions/branched/when/eliminateSubject/whenWithoutSubject.kt");
}
@TestMetadata("withoutElse.kt")
public void testWithoutElse() throws Exception {
runTest("idea/testData/intentions/branched/when/eliminateSubject/withoutElse.kt");
}
@TestMetadata("withoutElseUsedAsExpression.kt")
public void testWithoutElseUsedAsExpression() throws Exception {
runTest("idea/testData/intentions/branched/when/eliminateSubject/withoutElseUsedAsExpression.kt");
}
}
@TestMetadata("idea/testData/intentions/branched/when/flatten")