Humanize type mismatch diagnostic caused by type projections
#KT-10581 Fixed
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class A<T> {
|
||||
operator fun plus(x: T): A<T> = this
|
||||
operator fun set(x: Int, y: T) {}
|
||||
operator fun get(x: T) = 1
|
||||
}
|
||||
|
||||
fun test(a: A<out CharSequence>) {
|
||||
a <!MEMBER_PROJECTED_OUT(public final operator fun plus\(x: T\): A<T> defined in A; A<out kotlin.CharSequence>)!>+<!> ""
|
||||
<!MEMBER_PROJECTED_OUT(public final operator fun set\(x: kotlin.Int, y: T\): kotlin.Unit defined in A; A<out kotlin.CharSequence>)!>a[1]<!> = ""
|
||||
<!MEMBER_PROJECTED_OUT(public final operator fun get\(x: T\): kotlin.Int defined in A; A<out kotlin.CharSequence>)!>a[""]<!>
|
||||
}
|
||||
Reference in New Issue
Block a user