Convert lambda to callable reference intention / inspection #KT-10903 Fixed
(cherry picked from commit b620099)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
b5bdb070a0
commit
220141ab2b
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: false
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun List<Int>.transform(x: Int = 0, f: (Int) -> Int) = map { f(it + x) }
|
||||
|
||||
fun bar(x: Int) = x * x
|
||||
|
||||
val y = listOf(1, 2, 3).transform { <caret>bar(it) }
|
||||
Reference in New Issue
Block a user