Files
kotlin-fork/compiler/testData/diagnostics/tests/delegatedProperty/inference/kt41952.kt
T
Dmitriy Novozhilov a1a9a55e1a [Test] Add test for KT-41952
^KT-41952 Obsolete
2023-01-31 07:53:09 +00:00

24 lines
602 B
Kotlin
Vendored

// FIR_IDENTICAL
// ISSUE: KT-41952
import kotlin.reflect.KClass
import kotlin.reflect.KProperty
class Issue {
val strings by bidir_collection(String::class) {
takeIssue(it) // Issue? instead of Issue
}
}
fun takeIssue(issue: Issue) {}
fun <Self : Any, Target : Any> Self.bidir_collection(targetType: KClass<out Target>, f: (Self) -> Unit): Delegate<Self, Collection<Target>> = null!!
class Delegate<R, T> {
operator fun getValue(thisRef: R, property: KProperty<*>): T {
return null!!
}
operator fun setValue(thisRef: R, property: KProperty<*>, value: T) {}
}