"Make types implicit in lambda" intention - adapted to new lambda syntax + do not work on closing brace
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
public class TestingUse {
|
||||
fun test(sum: Int.(a: Int) -> Int, b: Int): Int {
|
||||
return b.sum(b)
|
||||
}
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val num = TestingUse().test({ Int.(x: Int): Int -> x + 2 <caret>}, 20)
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
public class TestingUse {
|
||||
fun test(sum: Int.(a: Int) -> Int, b: Int): Int {
|
||||
return b.sum(b)
|
||||
}
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val num = TestingUse().test({ x -> x + 2 }, 20)
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fun main() {
|
||||
val sum = { (<caret>x: Int, y: Int): Int -> x + y }
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fun main() {
|
||||
val sum = { x, y -> x + y }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// IS_APPLICABLE: false
|
||||
fun main() {
|
||||
val sum = { (x: Int, y: Int) -> <caret>x + y }
|
||||
val sum = { x: Int, y: Int -> <caret>x + y }
|
||||
}
|
||||
|
||||
@@ -4,5 +4,5 @@ public class TestingUse {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val funcInfunc = TestingUse().test6({<caret>(f: (Int) -> Int): Boolean -> f(5) > 20}, {x -> x + 2})
|
||||
val funcInfunc = TestingUse().test6({<caret>f: (Int) -> Int -> f(5) > 20}, {x -> x + 2})
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
fun main() {
|
||||
val f = {<caret> (x: Int, str: String): Unit -> x }
|
||||
val f = {<caret> x: Int, str: String -> x }
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
fun main() {
|
||||
val foo: (Int) -> String = {(x: Int) -> "This number is " + x<caret>}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun main() {
|
||||
val foo: (Int) -> String = {x: Int<caret> -> "This number is " + x}
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
fun main() {
|
||||
val bar: (Array<String>) -> Int = {<caret>(arr): Int -> arr.size()}
|
||||
}
|
||||
-3
@@ -1,3 +0,0 @@
|
||||
fun main() {
|
||||
val bar: (Array<String>) -> Int = { arr -> arr.size()}
|
||||
}
|
||||
@@ -1,3 +1,3 @@
|
||||
fun main() {
|
||||
val double = { (<caret>x: Int) -> x * 2 }
|
||||
val double = { <caret>x: Int -> x * 2 }
|
||||
}
|
||||
|
||||
@@ -4,5 +4,5 @@ fun testing(x: Int, y: Int, f: (a: Int, b: Int) -> Int): Int {
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val num = testing(1, 2, { x, y -> x + y <caret>})
|
||||
val num = testing(1, 2, {<caret> x, y -> x + y })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user