3964ee38be
This commit is intended to avoid the second resolve of delegate when we need to consider provideDelegate() possibility in inference. Also here we provide correct completion of synthetic calls during delegate inference. #KT-58013 Fixed
17 lines
406 B
Kotlin
Vendored
17 lines
406 B
Kotlin
Vendored
// FIR_IDENTICAL
|
|
// ISSUE: KT-58013 (related)
|
|
// WITH_REFLECT
|
|
// FIR_DUMP
|
|
|
|
import kotlin.reflect.KProperty
|
|
|
|
data class Ref<D>(val t: D)
|
|
|
|
operator fun <V> Ref<V>.getValue(hisRef: Any?, property: KProperty<*>): V = this.t
|
|
|
|
fun <E> List<Ref<*>>.getElement(i: Int): Ref<E> = this[i] <!UNCHECKED_CAST!>as Ref<E><!>
|
|
|
|
fun test(list: List<Ref<*>>) {
|
|
val data: String by try { list.getElement(0) } finally {}
|
|
}
|