Files
kotlin-fork/idea/testData/intentions/convertToForEachFunctionCall/binaryExpressionLoopRange.kt
T
Pradyoth Kukkapalli 33fd82cf45 New Intention: Replace for loop with forEach
Replaces an expression of the form “for (i in list) { … }” with an
expression of the form “list.forEach { i -> … }”
2014-05-07 14:01:37 +04:00

6 lines
82 B
Kotlin

// WITH_RUNTIME
fun main() {
<caret>for (x in 1 rangeTo 2) {
x
}
}