Simplify for now works even if no variables are declared inside loop #KT-12145 Fixed
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// IS_APPLICABLE: false
|
||||
// WITH_RUNTIME
|
||||
|
||||
data class XY(val x: Int, val y: Int)
|
||||
fun test(xys: Array<XY>) {
|
||||
for (xy in xys) {
|
||||
val x = xy.x
|
||||
println(x)
|
||||
val y = xy.y + x
|
||||
println(y)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user