e72ddbcbfe
To do so, inside the root cause of inapplicable candidate errors, we will record expected/actual type of receiver, if any. That will help identifying inapplicable calls on nullable receiver.
22 lines
412 B
Kotlin
Vendored
22 lines
412 B
Kotlin
Vendored
// !WITH_NEW_INFERENCE
|
|
package a
|
|
|
|
class MyClass {
|
|
fun component1(i: Int) {}
|
|
}
|
|
|
|
class MyClass2 {}
|
|
|
|
<!CONFLICTING_OVERLOADS!>fun MyClass2.component1()<!> = 1.2
|
|
<!CONFLICTING_OVERLOADS!>fun MyClass2.component1()<!> = 1.3
|
|
|
|
fun test(mc1: MyClass, mc2: MyClass2) {
|
|
val (a, b) = <!COMPONENT_FUNCTION_MISSING!>mc1<!>
|
|
val (c) = mc2
|
|
|
|
//a,b,c are error types
|
|
use(a, b, c)
|
|
}
|
|
|
|
fun use(vararg a: Any?) = a
|