Iterate Intention: Add support of destructuring declarations

This commit is contained in:
Alexey Sedunov
2015-12-17 21:30:14 +03:00
parent 1d3054e7a6
commit ae636a0d32
10 changed files with 158 additions and 56 deletions
@@ -0,0 +1,12 @@
// WITH_RUNTIME
class Foo(val id: Int, val name: String)
operator fun Foo.component1() = id
operator fun Foo.component2() = name
operator fun Foo.component3() = "$name: $id"
fun test() {
for ((i, s, s1) in listOf(Foo(123, "def"), Foo(456, "abc"))) {
<caret>
}
}