mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
21 lines
352 B
Kotlin
21 lines
352 B
Kotlin
package test
|
|
|
|
import kotlin.platform.platformStatic
|
|
|
|
class A {
|
|
companion object {
|
|
[platformStatic] val b: String = "OK"
|
|
|
|
var A.c: String
|
|
[platformStatic] get() = "OK"
|
|
[platformStatic] set(t: String) {}
|
|
}
|
|
}
|
|
|
|
fun main(args: Array<String>) {
|
|
A.b
|
|
with(A) {
|
|
A().c
|
|
A().c = "123"
|
|
}
|
|
} |