9891f562cc
During subtyping/incorporation we transform types (e.g. changing nullability, form of the type) and, basically, we're doing this to some FIXPOINT. It's important that we use `KotlinType.hashCode()` to compare types, but for error types hashCode is a hashCode of its supertype and, for example, `makeNullableAsSpecified` method recreate type every time. So, we continue to generate new constraints and we'll never stop incorporation algorithm
27 lines
730 B
Kotlin
Vendored
27 lines
730 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
// NI_EXPECTED_FILE
|
|
import kotlin.reflect.KProperty
|
|
|
|
var a: Int by A()
|
|
var a1 by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE, DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>A()<!>
|
|
|
|
var b: Int by B()
|
|
|
|
val cObj = C()
|
|
var c: String by cObj
|
|
|
|
class A {
|
|
operator fun <T> getValue(t: Any?, p: KProperty<*>): T = null!!
|
|
operator fun <T> setValue(t: Any?, p: KProperty<*>, x: T) = Unit
|
|
}
|
|
|
|
class B
|
|
|
|
operator fun <T> B.getValue(t: Any?, p: KProperty<*>): T = null!!
|
|
operator fun <T> B.setValue(t: Any?, p: KProperty<*>, x: T) = Unit
|
|
|
|
class C
|
|
|
|
operator inline fun <reified T> C.getValue(t: Any?, p: KProperty<*>): T = null!!
|
|
operator inline fun <reified T> C.setValue(t: Any?, p: KProperty<*>, x: T) = Unit
|