Simplify for: take into account two or more possible local variables for the same loop parameter property

This commit is contained in:
Mikhail Glukhikh
2016-05-18 19:45:28 +03:00
parent 9108ab1923
commit f81192d48f
3 changed files with 27 additions and 8 deletions
@@ -0,0 +1,12 @@
// IS_APPLICABLE: false
// WITH_RUNTIME
data class XY(val x: String, val y: Int)
fun test(xys: Array<XY>) {
for (<caret>xy in xys) {
val x = xy.x
println(x)
val xx = xy.x
println(xx)
}
}