diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/refactoring/introduce/InplaceIntroduceFunctionTestGenerated.java b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/refactoring/introduce/InplaceIntroduceFunctionTestGenerated.java index 2e2ff34d852d..822834ccaffb 100644 --- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/refactoring/introduce/InplaceIntroduceFunctionTestGenerated.java +++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/refactoring/introduce/InplaceIntroduceFunctionTestGenerated.java @@ -53,6 +53,11 @@ public class InplaceIntroduceFunctionTestGenerated extends AbstractInplaceIntrod runTest("testData/refactoring/extractFunctionInplace/ExtractLocal.kt"); } + @TestMetadata("ExtractLocalWithLambda.kt") + public void testExtractLocalWithLambda() throws Exception { + runTest("testData/refactoring/extractFunctionInplace/ExtractLocalWithLambda.kt"); + } + @TestMetadata("MoveLambdaOutsideParenthesis.kt") public void testMoveLambdaOutsideParenthesis() throws Exception { runTest("testData/refactoring/extractFunctionInplace/MoveLambdaOutsideParenthesis.kt"); diff --git a/plugins/kotlin/idea/tests/testData/refactoring/extractFunctionInplace/ExtractLocalWithLambda.kt b/plugins/kotlin/idea/tests/testData/refactoring/extractFunctionInplace/ExtractLocalWithLambda.kt new file mode 100644 index 000000000000..1b9d4e28aaf8 --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/refactoring/extractFunctionInplace/ExtractLocalWithLambda.kt @@ -0,0 +1,5 @@ +inline fun inFun(block: (Any) -> R): R = TODO() +fun foo(): Any { + inFun { a -> return a } +} +// IGNORE_K1 \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/refactoring/extractFunctionInplace/ExtractLocalWithLambda.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/extractFunctionInplace/ExtractLocalWithLambda.kt.after new file mode 100644 index 000000000000..478f5b757abb --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/refactoring/extractFunctionInplace/ExtractLocalWithLambda.kt.after @@ -0,0 +1,7 @@ +inline fun inFun(block: (Any) -> R): R = TODO() +fun foo(): Any { + fun any(): Any = inFun { a -> return a } + + return any() +} +// IGNORE_K1 \ No newline at end of file diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/introduce/K2InplaceIntroduceFunctionTestGenerated.java b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/introduce/K2InplaceIntroduceFunctionTestGenerated.java index 6fb4b2c9f539..9a6f0c8dcc63 100644 --- a/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/introduce/K2InplaceIntroduceFunctionTestGenerated.java +++ b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/introduce/K2InplaceIntroduceFunctionTestGenerated.java @@ -53,6 +53,11 @@ public class K2InplaceIntroduceFunctionTestGenerated extends AbstractK2InplaceIn runTest("../../idea/tests/testData/refactoring/extractFunctionInplace/ExtractLocal.kt"); } + @TestMetadata("ExtractLocalWithLambda.kt") + public void testExtractLocalWithLambda() throws Exception { + runTest("../../idea/tests/testData/refactoring/extractFunctionInplace/ExtractLocalWithLambda.kt"); + } + @TestMetadata("MoveLambdaOutsideParenthesis.kt") public void testMoveLambdaOutsideParenthesis() throws Exception { runTest("../../idea/tests/testData/refactoring/extractFunctionInplace/MoveLambdaOutsideParenthesis.kt");