b2fa104081
Previously, when a candidate was found with an applicability that is better than the current best applicability, all previous candidates were thrown away. Now we keep them, unless the new applicability is successful. If no successful candidates are found, we fully resolve all the unsuccessful ones and select the ones with the least bad applicability. This improves diagnostics for unresolved calls. #KT-57844 Fixed
19 lines
285 B
Kotlin
Vendored
19 lines
285 B
Kotlin
Vendored
// !CHECK_TYPE
|
|
|
|
package d
|
|
|
|
import checkSubtype
|
|
|
|
fun <T: Any> joinT(x: Int, vararg a: T): T? {
|
|
return null
|
|
}
|
|
|
|
fun <T: Any> joinT(x: Comparable<*>, y: T): T? {
|
|
return null
|
|
}
|
|
|
|
fun test() {
|
|
val x2 = joinT(<!ARGUMENT_TYPE_MISMATCH!>Unit<!>, "2")
|
|
checkSubtype<String?>(x2)
|
|
}
|