mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-18 08:31:38 +00:00
30 lines
394 B
Kotlin
Vendored
30 lines
394 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
|
|
|
|
fun test(list: A) {
|
|
if (true) {
|
|
val (c) = list
|
|
}
|
|
else {}
|
|
|
|
if (true) {
|
|
Unit
|
|
val (c) = list
|
|
}
|
|
else {}
|
|
|
|
when (1) {
|
|
1 -> {
|
|
val (c) = list
|
|
}
|
|
}
|
|
|
|
fn { it ->
|
|
val (a) = it
|
|
}
|
|
}
|
|
|
|
class A {
|
|
operator fun component1() = 1
|
|
}
|
|
|
|
fun fn(x: (A) -> Unit) {} |