mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
14 lines
212 B
Kotlin
Vendored
14 lines
212 B
Kotlin
Vendored
class A {
|
|
operator fun component1() = 1
|
|
operator fun component2() = 2
|
|
}
|
|
|
|
fun box() : String {
|
|
val (a, b) = A()
|
|
|
|
val run = {
|
|
a
|
|
}
|
|
return if (run() == 1 && b == 2) "OK" else "fail"
|
|
}
|