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
@@ -0,0 +1,16 @@
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
fun foo() {}
fun foo(s: Int) {}
fun bar(a: Any) {}
fun bar(a: Int) {}
fun test() {
<!NONE_APPLICABLE!>foo<!>(1, 2)
foo(<!TYPE_MISMATCH!>""<!>)
<!NONE_APPLICABLE!>bar<!>(1, 2)
<!NONE_APPLICABLE!>bar<!>()
}
@@ -0,0 +1,7 @@
package
internal fun bar(/*0*/ a: kotlin.Any): kotlin.Unit
internal fun bar(/*0*/ a: kotlin.Int): kotlin.Unit
internal fun foo(): kotlin.Unit
internal fun foo(/*0*/ s: kotlin.Int): kotlin.Unit
internal fun test(): kotlin.Unit