Files
kotlin-fork/idea/testData/intentions/convertToForEachLoop/zeroArguments.kt
T
Pradyoth Kukkapalli dbb28c571b New Intention Action: Replace a call to forEach function with for loop.
Replaces an expression of form x.forEach { … } with for (a in x) { … }.
2014-05-07 14:00:50 +04:00

11 lines
138 B
Kotlin

// IS_APPLICABLE: false
// WITH_RUNTIME
class Foo {
fun forEach(): Int = 0
}
fun main() {
val x = Foo()
<caret>x.forEach()
}