mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 08:31:35 +00:00
14 lines
298 B
Kotlin
Vendored
14 lines
298 B
Kotlin
Vendored
class A {
|
|
operator fun component1() = 42
|
|
operator fun component2() = 42
|
|
}
|
|
|
|
fun foo(a: A, c: Int) {
|
|
val (<!NAME_SHADOWING!>a<!>, b) = a
|
|
val arr = Array(2) { A() }
|
|
for ((<!NAME_SHADOWING!>c<!>, d) in arr) {
|
|
|
|
}
|
|
|
|
val <!UNUSED_VARIABLE!>e<!> = a.toString() + b + c
|
|
} |