dbb28c571b
Replaces an expression of form x.forEach { … } with for (a in x) { … }.
11 lines
182 B
Kotlin
11 lines
182 B
Kotlin
// IS_APPLICABLE: false
|
|
// WITH_RUNTIME
|
|
class Foo {
|
|
fun forEach(predicate: (Int) -> Int): Int = predicate(0)
|
|
}
|
|
|
|
fun main() {
|
|
val x = Foo()
|
|
|
|
<caret>x.forEach({ it * 2 })
|
|
} |