MoveVariableDeclarationIntoWhenInspection: report it if initializer is single line even if property is multi line

#KT-39467 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-07-17 11:48:14 +09:00
committed by Dmitry Gridin
parent 75d4c7e91c
commit 4569b85a16
6 changed files with 54 additions and 5 deletions
@@ -6885,6 +6885,16 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
runTest("idea/testData/inspectionsLocal/moveVariableDeclarationIntoWhen/inUnaryAndProperty.kt");
}
@TestMetadata("multiLinePropertywithSingleLineInitializer.kt")
public void testMultiLinePropertywithSingleLineInitializer() throws Exception {
runTest("idea/testData/inspectionsLocal/moveVariableDeclarationIntoWhen/multiLinePropertywithSingleLineInitializer.kt");
}
@TestMetadata("multiLinePropertywithSingleLineInitializer2.kt")
public void testMultiLinePropertywithSingleLineInitializer2() throws Exception {
runTest("idea/testData/inspectionsLocal/moveVariableDeclarationIntoWhen/multiLinePropertywithSingleLineInitializer2.kt");
}
@TestMetadata("notApplicableInBinaryExpression.kt")
public void testNotApplicableInBinaryExpression() throws Exception {
runTest("idea/testData/inspectionsLocal/moveVariableDeclarationIntoWhen/notApplicableInBinaryExpression.kt");