Files
Ilya Kirillov 1bbcae5ed2 [FIR] fix resolve contract violation from scopes
We cannot call lazy resolve to STATUS phase from scopes as scopes may be accessed on a STATUS phase or earlier

^KT-54890
^KTIJ-23587 fixed
2023-01-13 21:32:51 +00:00

22 lines
573 B
Kotlin
Vendored

// WITH_STDLIB
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty
abstract class MainActivity : DIAware1() {
val bar: Bar by <!DEBUG_INFO_LEAKING_THIS!>instance1<!>()
}
class Bar
open class DIAware1 {
inline fun <reified T : Any> DIAware1.instance1(tag: Any? = null): DIProperty<T> = TODO()
}
class DIProperty<out V> : LazyDelegate<V> {
override fun provideDelegate(receiver: Any?, prop: KProperty<Any?>): Lazy<V> = TODO()
}
interface LazyDelegate<out V> {
operator fun provideDelegate(receiver: Any?, prop: KProperty<Any?>): Lazy<V>
}