Introduce inapplicable wrong receiver status to improve diagnostics

#KT-10754 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-07-10 05:19:19 +03:00
parent 79ee8f452c
commit 178bb900b4
7 changed files with 34 additions and 8 deletions
@@ -0,0 +1,8 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A
fun A.fn(b: Int): Nothing = TODO()
fun A.run() {
"".apply { fn(<!TYPE_MISMATCH!>""<!>) }
}
@@ -0,0 +1,11 @@
package
public fun A.fn(/*0*/ b: kotlin.Int): kotlin.Nothing
public fun A.run(): kotlin.Unit
public final class A {
public constructor A()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}