mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
18 lines
266 B
Kotlin
Vendored
18 lines
266 B
Kotlin
Vendored
class A {
|
|
companion object {
|
|
val i1 = 1
|
|
val i2 = 2
|
|
}
|
|
}
|
|
|
|
class B {
|
|
companion object Named {
|
|
val i1 = 3
|
|
val i2 = 4
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
return if (J.f() == A.i1 + A.i2 + B.i1 + B.i2) "OK" else "Fail: ${J.f()}"
|
|
}
|