mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
17 lines
264 B
Kotlin
17 lines
264 B
Kotlin
class A {
|
|
fun component1() = 1
|
|
fun component2() = 2
|
|
}
|
|
|
|
|
|
fun box() : String {
|
|
val (a, b) = A()
|
|
|
|
val local = object {
|
|
public fun run() : Int {
|
|
return a
|
|
}
|
|
}
|
|
return if (local.run() == 1 && b == 2) "OK" else "fail"
|
|
}
|