mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 08:31:26 +00:00
17 lines
274 B
Kotlin
Vendored
17 lines
274 B
Kotlin
Vendored
class A(val result: Int) {
|
|
object B {
|
|
fun bar(): Int = 4
|
|
val prop = 5
|
|
}
|
|
object C {
|
|
}
|
|
|
|
constructor() : this(B.bar() + B.prop)
|
|
}
|
|
|
|
fun box(): String {
|
|
val result = A().result
|
|
if (result != 9) return "fail: $result"
|
|
return "OK"
|
|
}
|