Files
kotlin-fork/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.kt
T
Mikhail Zarechenskiy 2e131b870a Add tests for obsolete issues
#KT-38804 Obsolete
 #KT-38801 Obsolete
 #KT-38835 Obsolete
 #KT-38737 Obsolete
 #KT-38664 Obsolete
 #KT-38549 Obsolete
 #KT-38766 Obsolete
 #KT-38714 Obsolete
2020-08-11 12:34:02 +03:00

22 lines
574 B
Kotlin
Vendored

// WITH_RUNTIME
// !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>
}