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