mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 00:21:32 +00:00
17 lines
219 B
Kotlin
Vendored
17 lines
219 B
Kotlin
Vendored
var state: String = "Fail"
|
|
|
|
class A private constructor(x: String = "OK") {
|
|
init {
|
|
state = x
|
|
}
|
|
|
|
companion object {
|
|
fun foo() = A()
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
A.foo()
|
|
return state
|
|
}
|