[FIR] Consider ConeConstraintSystemHasContradiction as a good reason for DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE error

This commit is contained in:
Dmitriy Novozhilov
2022-11-21 17:39:27 +02:00
committed by Space Team
parent 9b7b517f43
commit 06e88b559a
9 changed files with 33 additions and 63 deletions
@@ -1,16 +0,0 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty
class StringDelegate(val s: String) {
operator fun getValue(a: Any?, p: KProperty<*>): Int = 42
}
// NB no operator
fun String.provideDelegate(a: Any?, p: KProperty<*>) = StringDelegate(this)
operator fun String.getValue(a: Any?, p: KProperty<*>) = this
val test1: String by "OK"
val test2: Int by <!DELEGATE_SPECIAL_FUNCTION_RETURN_TYPE_MISMATCH!>"OK"<!>
val test3 by "OK"
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty