Improved error reporting for candidates with wrong parameter count
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user