FIR checkers: report specific errors instead of INAPPLICABLE_CANDIDATE
Specifically, the report the following 4 errors. * NON_VARARG_SPREAD * ARGUMENT_PASSED_TWICE * TOO_MANY_ARGUMENTS * NO_VALUE_FOR_PARAMETER Also added/updated the following position strategies. * NAME_OF_NAMED_ARGUMENT * VALUE_ARGUMENTS
This commit is contained in:
committed by
Mikhail Glukhikh
parent
fc8d0e3ee0
commit
761a0a7d0d
@@ -1,4 +0,0 @@
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
fun foo(first: Array<Any?>, second: Array<Any?>) = Pair(first.<!INAPPLICABLE_CANDIDATE!>toCollection<!>(), second.<!INAPPLICABLE_CANDIDATE!>toCollection<!>())
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@ fun <E> List<*>.toArray(ar: Array<E>): Array<E> = ar
|
||||
fun testArrays(ci: List<Int?>, cii: List<Int?>?) {
|
||||
val c1: Array<Int?> = cii.sure().<!INAPPLICABLE_CANDIDATE!>toArray<!>(Array<Int?>)
|
||||
|
||||
val c2: Array<Int?> = ci.toArray(<!INAPPLICABLE_CANDIDATE!>Array<!><Int?>())
|
||||
val c2: Array<Int?> = ci.toArray(Array<Int?>(<!NO_VALUE_FOR_PARAMETER, NO_VALUE_FOR_PARAMETER!>)<!>)
|
||||
|
||||
val c3 = <!INAPPLICABLE_CANDIDATE!>Array<!><Int?>()
|
||||
val c3 = Array<Int?>(<!NO_VALUE_FOR_PARAMETER, NO_VALUE_FOR_PARAMETER!>)<!>
|
||||
|
||||
val c4 = ci.toArray<Int?>(<!INAPPLICABLE_CANDIDATE!>Array<!><Int?>())
|
||||
val c4 = ci.toArray<Int?>(Array<Int?>(<!NO_VALUE_FOR_PARAMETER, NO_VALUE_FOR_PARAMETER!>)<!>)
|
||||
|
||||
val c5 = ci.toArray(<!INAPPLICABLE_CANDIDATE!>Array<!><Int?>())
|
||||
val c5 = ci.toArray(Array<Int?>(<!NO_VALUE_FOR_PARAMETER, NO_VALUE_FOR_PARAMETER!>)<!>)
|
||||
|
||||
checkSubtype<Array<Int?>>(c1)
|
||||
checkSubtype<Array<Int?>>(c2)
|
||||
|
||||
Reference in New Issue
Block a user