mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
Fix for KT-9692: Deadlock between <clinit> of a class (KtSimpleNameExpressionImpl) and <clinit> of its companion object #KT-9692 Fixed
20 lines
405 B
Kotlin
Vendored
20 lines
405 B
Kotlin
Vendored
interface IStatic
|
|
|
|
open class Static(x: IStatic) {
|
|
fun doSth() {
|
|
}
|
|
}
|
|
|
|
class ConcreteWithStatic : IStatic {
|
|
companion object : Static(ConcreteWithStatic())
|
|
}
|
|
|
|
fun box(): String {
|
|
ConcreteWithStatic.doSth()
|
|
|
|
val companion: Any? = CompanionInitialization.getCompanion()
|
|
if (companion == null) return "fail 1"
|
|
if (companion != ConcreteWithStatic) return "fail 2"
|
|
|
|
return "OK"
|
|
} |