Convrt anonymous function to lambda: fix incorrectly conversion
#KT-28618
This commit is contained in:
committed by
Mikhail Glukhikh
parent
f6323cdee4
commit
9ee9965c7a
+6
@@ -0,0 +1,6 @@
|
||||
fun foo(f: (Int) -> Boolean) {
|
||||
f(1)
|
||||
}
|
||||
fun test() {
|
||||
foo(<caret>fun(i: Int): Boolean {return i > 0 })
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
fun foo(f: (Int) -> Boolean) {
|
||||
f(1)
|
||||
}
|
||||
fun test() {
|
||||
foo { i -> i > 0 }
|
||||
}
|
||||
@@ -1954,6 +1954,11 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
|
||||
runTest("idea/testData/intentions/anonymousFunctionToLambda/moveOut.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noSpaceAfterFunctionLeftBrace.kt")
|
||||
public void testNoSpaceAfterFunctionLeftBrace() throws Exception {
|
||||
runTest("idea/testData/intentions/anonymousFunctionToLambda/noSpaceAfterFunctionLeftBrace.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("paramName.kt")
|
||||
public void testParamName() throws Exception {
|
||||
runTest("idea/testData/intentions/anonymousFunctionToLambda/paramName.kt");
|
||||
|
||||
Reference in New Issue
Block a user