mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
* When referencing the companion itself, they should use the $$INSTANCE field, not the (null until <clinit> returns) Companion field of the interface. * Interface companion init blocks should be made static.
10 lines
183 B
Kotlin
Vendored
10 lines
183 B
Kotlin
Vendored
// IGNORE_BACKEND_FIR: JVM_IR
|
|
interface Test {
|
|
companion object {
|
|
fun ok() = "OK"
|
|
val x = run { Test.ok() }
|
|
fun test() = x
|
|
}
|
|
}
|
|
|
|
fun box() = Test.test() |