mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
34 lines
541 B
Kotlin
Vendored
34 lines
541 B
Kotlin
Vendored
import kotlin.platform.platformStatic
|
|
|
|
object AX {
|
|
|
|
@platformStatic val c: String = "OK"
|
|
|
|
@platformStatic fun aStatic(): String {
|
|
return AX.b()
|
|
}
|
|
|
|
fun aNonStatic(): String {
|
|
return AX.b()
|
|
}
|
|
|
|
@platformStatic fun b(): String {
|
|
return "OK"
|
|
}
|
|
|
|
fun getProperty(): String {
|
|
return AX.c
|
|
}
|
|
|
|
}
|
|
|
|
fun box() : String {
|
|
|
|
if (AX.aStatic() != "OK") return "fail 1"
|
|
|
|
if (AX.aNonStatic() != "OK") return "fail 2"
|
|
|
|
if (AX.getProperty() != "OK") return "fail 3"
|
|
|
|
return "OK"
|
|
} |