mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
8 lines
179 B
Kotlin
Vendored
8 lines
179 B
Kotlin
Vendored
data class A(val x: Int, val y: Any?, val z: String)
|
|
|
|
fun box(): String {
|
|
val a = A(42, null, "OK")
|
|
val (x, y, z) = a
|
|
return if (x == 42 && y == null) z else "Fail"
|
|
}
|