Destructure is available even without usages #KT-14435 Fixed

This commit is contained in:
mglukhikh
2017-03-31 15:14:21 +03:00
committed by Mikhail Glukhikh
parent feb9dd4d83
commit d9e1e82948
6 changed files with 36 additions and 3 deletions
@@ -1,4 +1,3 @@
// IS_APPLICABLE: false
// WITH_RUNTIME
data class XY(val x: String, val y: String)
@@ -0,0 +1,6 @@
// WITH_RUNTIME
data class XY(val x: String, val y: String)
fun test(xys: Array<XY>) {
for ((x, y) in xys) {}
}
@@ -0,0 +1,6 @@
// WITH_RUNTIME
fun main(args: Array<String>) {
val map = hashMapOf(1 to 1)
for (<caret>entry in map) {}
}
@@ -0,0 +1,6 @@
// WITH_RUNTIME
fun main(args: Array<String>) {
val map = hashMapOf(1 to 1)
for ((key, value) in map) {}
}