816d89e393
This commits introduces testdata changes, where NI behaviour strictly improved, after several previous fixes. For some tests, just WITH_NEW_INFERENCE directive was added. It indicates, that some of previous commits first introduced error in that test, and then some other commit fixed it (netting no overall testdata change). It is preferrably to keep those annotations until we will migrate to NI completely, to prevent unexpected regressions.
45 lines
807 B
Kotlin
Vendored
45 lines
807 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
|
// !WITH_NEW_INFERENCE
|
|
// FILE: 1.kt
|
|
package k
|
|
|
|
private fun zero() {}
|
|
private fun zero(a: Int) {}
|
|
private fun zero(a: String) {}
|
|
|
|
fun one() {}
|
|
private fun one(a: Int) {}
|
|
private fun one(a: String) {}
|
|
|
|
fun two() {}
|
|
fun two(a: Int) {}
|
|
private fun two(a: String) {}
|
|
|
|
fun all() {}
|
|
fun all(a: Int) {}
|
|
fun all(a: String) {}
|
|
|
|
// FILE: 2.kt
|
|
|
|
import k.<!INVISIBLE_REFERENCE, DEBUG_INFO_MISSING_UNRESOLVED!>zero<!>
|
|
import k.one
|
|
import k.two
|
|
import k.all
|
|
|
|
fun test() {
|
|
<!INVISIBLE_MEMBER!>zero<!>()
|
|
<!INVISIBLE_MEMBER!>zero<!>(1)
|
|
<!INVISIBLE_MEMBER!>zero<!>("")
|
|
|
|
one()
|
|
one(<!TOO_MANY_ARGUMENTS!>1<!>)
|
|
one(<!TOO_MANY_ARGUMENTS!>""<!>)
|
|
|
|
two()
|
|
two(1)
|
|
two(<!TYPE_MISMATCH!>""<!>)
|
|
|
|
all()
|
|
all(1)
|
|
all("")
|
|
} |