KT-2667 Support multi-declarations in for-loops in control flow analysis

#KT-2667 fixed
This commit is contained in:
Svetlana Isakova
2012-08-23 14:25:13 +04:00
parent 21774f5288
commit ac39daace6
6 changed files with 68 additions and 34 deletions
@@ -0,0 +1,17 @@
// KT-2667 Support multi-declarations in for-loops in control flow analysis
package d
import java.util.List
class A {
fun component1() = 1
fun component2() = 2
fun component3() = 3
}
fun foo(list: List<A>) {
for (var (c1, c2, c3) in list) {
c1 = <!UNUSED_VALUE!>1<!>
c3 + 1
}
}