73aa465ee9
Note that KT-30696 is fixed only in the single-module case, and KT-42012 is not fixed fully (see KT-44855). #KT-30041 #KT-30629 #KT-30696 #KT-30933 #KT-32351 #KT-32749 #KT-38849 #KT-42012 #KT-42990 #KT-44234 #KT-44529 #KT-44631 #KT-44647
27 lines
414 B
Kotlin
Vendored
27 lines
414 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM
|
|
// KT-44234
|
|
|
|
class App {
|
|
val context: Context = Context()
|
|
|
|
fun onCreate() {
|
|
instance = this
|
|
}
|
|
|
|
companion object {
|
|
private lateinit var instance: App set
|
|
val context: Context get() = instance.context
|
|
}
|
|
|
|
}
|
|
|
|
class Context {
|
|
fun print(): String = "OK"
|
|
}
|
|
|
|
fun box(): String {
|
|
val app = App()
|
|
app.onCreate()
|
|
return App.context.print()
|
|
}
|