Move statement: do not move into lambda beyond 'if/when/try/for/while'

#KT-9065 Fixed
This commit is contained in:
Toshiaki Kameyama
2019-08-03 17:29:09 +02:00
committed by Vladimir Dolzhenko
parent ee5ecb232a
commit 19824201e2
28 changed files with 296 additions and 0 deletions
@@ -1063,6 +1063,71 @@ public class MoveStatementTestGenerated extends AbstractMoveStatementTest {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambda3.kt");
}
@TestMetadata("lambdaInDoWhile.kt")
public void testLambdaInDoWhile() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInDoWhile.kt");
}
@TestMetadata("lambdaInDoWhile2.kt")
public void testLambdaInDoWhile2() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInDoWhile2.kt");
}
@TestMetadata("lambdaInFor.kt")
public void testLambdaInFor() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInFor.kt");
}
@TestMetadata("lambdaInFor2.kt")
public void testLambdaInFor2() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInFor2.kt");
}
@TestMetadata("lambdaInIf.kt")
public void testLambdaInIf() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInIf.kt");
}
@TestMetadata("lambdaInIf2.kt")
public void testLambdaInIf2() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInIf2.kt");
}
@TestMetadata("lambdaInTry.kt")
public void testLambdaInTry() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInTry.kt");
}
@TestMetadata("lambdaInTry2.kt")
public void testLambdaInTry2() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInTry2.kt");
}
@TestMetadata("lambdaInTry3.kt")
public void testLambdaInTry3() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInTry3.kt");
}
@TestMetadata("lambdaInWhen.kt")
public void testLambdaInWhen() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInWhen.kt");
}
@TestMetadata("lambdaInWhen2.kt")
public void testLambdaInWhen2() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInWhen2.kt");
}
@TestMetadata("lambdaInWhile.kt")
public void testLambdaInWhile() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInWhile.kt");
}
@TestMetadata("lambdaInWhile2.kt")
public void testLambdaInWhile2() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/lambdaInWhile2.kt");
}
@TestMetadata("multilineComment1.kt")
public void testMultilineComment1() throws Exception {
runTest("idea/testData/codeInsight/moveUpDown/expressions/multilineComment1.kt");