mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 08:31:30 +00:00
16 lines
294 B
Kotlin
16 lines
294 B
Kotlin
// KT-2667 Support multi-declarations in for-loops in control flow analysis
|
|
package d
|
|
|
|
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
|
|
}
|
|
}
|