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