Improved error reporting for candidates with wrong parameter count

This commit is contained in:
Stanislav Erokhin
2015-08-31 20:32:59 +03:00
parent 8ea6f36903
commit 5ded315cbb
23 changed files with 82 additions and 52 deletions
@@ -6,12 +6,11 @@ fun <T: Any> joinT(<!UNUSED_PARAMETER!>x<!>: Int, vararg <!UNUSED_PARAMETER!>a<!
return null
}
fun <T: Any> joinT(<!UNUSED_PARAMETER!>x<!>: Any, <!UNUSED_PARAMETER!>y<!>: T): T? {
fun <T: Any> joinT(<!UNUSED_PARAMETER!>x<!>: Comparable<*>, <!UNUSED_PARAMETER!>y<!>: T): T? {
return null
}
fun test() {
val x2 = joinT(<!NON_VARARG_SPREAD!>*<!>1, "2")
val x2 = <!TYPE_INFERENCE_PARAMETER_CONSTRAINT_ERROR!>joinT<!>(<!TYPE_MISMATCH!>Unit<!>, "2")
checkSubtype<String?>(x2)
}
}