Use more specific status to report diagnostics
#KT-12737 Fixed
This commit is contained in:
@@ -16,6 +16,7 @@ class C : T {
|
||||
super.foo() // OK
|
||||
<!SUPER_CANT_BE_EXTENSION_RECEIVER!>super<!>.bar() // Error
|
||||
super.buzz() // OK, resolved to a member
|
||||
super.buzz1(<!NO_VALUE_FOR_PARAMETER!>)<!> // Resolved to a member, but error: no parameter passed where required
|
||||
<!SUPER_CANT_BE_EXTENSION_RECEIVER!>super<!>.buzz1() // Resolved to an extension
|
||||
super.buzz1(<!TYPE_MISMATCH!>""<!>) // Resolved to a member
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// WITH_RUNTIME
|
||||
|
||||
fun Runnable.test(f: Runnable.(Int) -> Unit) {
|
||||
f(<!TYPE_MISMATCH!>""<!>)
|
||||
}
|
||||
|
||||
fun test(f: Runnable.(Int) -> Unit, runnable: Runnable) {
|
||||
with (runnable) {
|
||||
f(<!TYPE_MISMATCH!>""<!>)
|
||||
}
|
||||
}
|
||||
|
||||
fun Int.test(f: String.(Int) -> Unit) {
|
||||
f("", 0)
|
||||
f(""<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
with("") {
|
||||
f(0)
|
||||
f(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>0.0<!>)
|
||||
}
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
package
|
||||
|
||||
public fun test(/*0*/ f: java.lang.Runnable.(kotlin.Int) -> kotlin.Unit, /*1*/ runnable: java.lang.Runnable): kotlin.Unit
|
||||
public fun java.lang.Runnable.test(/*0*/ f: java.lang.Runnable.(kotlin.Int) -> kotlin.Unit): kotlin.Unit
|
||||
public fun kotlin.Int.test(/*0*/ f: kotlin.String.(kotlin.Int) -> kotlin.Unit): kotlin.Unit
|
||||
@@ -17,5 +17,5 @@ val test2 = WI(<!TOO_MANY_ARGUMENTS!>null<!>)
|
||||
|
||||
val test3 = CWI()
|
||||
val test4 = CWI("")
|
||||
val test5 = CWI(<!TOO_MANY_ARGUMENTS!>null<!>)
|
||||
val test5a = ClassWithCompanionObjectWithInvoke(<!TOO_MANY_ARGUMENTS!>null<!>)
|
||||
val test5 = CWI(<!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
val test5a = ClassWithCompanionObjectWithInvoke(<!NULL_FOR_NONNULL_TYPE!>null<!>)
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@ public val test1: ObjectWithInvoke
|
||||
public val test2: ObjectWithInvoke
|
||||
public val test3: CWI /* = ClassWithCompanionObjectWithInvoke */
|
||||
public val test4: kotlin.Any
|
||||
public val test5: CWI /* = ClassWithCompanionObjectWithInvoke */
|
||||
public val test5a: ClassWithCompanionObjectWithInvoke
|
||||
public val test5: kotlin.Any
|
||||
public val test5a: kotlin.Any
|
||||
|
||||
public final class ClassWithCompanionObjectWithInvoke {
|
||||
public constructor ClassWithCompanionObjectWithInvoke()
|
||||
|
||||
Reference in New Issue
Block a user