mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
14 lines
194 B
Kotlin
14 lines
194 B
Kotlin
class A {
|
|
fun component1() = 1
|
|
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"
|
|
}
|