[Test] Disable UNUSED_* diagnostics in tests which are not belong to contolFlowAnalysis suite

This commit is contained in:
Dmitriy Novozhilov
2021-03-29 12:14:16 +03:00
committed by TeamCityServer
parent 85949b387e
commit cd890d5833
758 changed files with 1832 additions and 3745 deletions
@@ -17,4 +17,4 @@ fun main() {
}
//from standard library
fun println(<!UNUSED_PARAMETER!>message<!> : Any?) {}
fun println(message : Any?) {}
@@ -4,7 +4,7 @@
@<!INVISIBLE_MEMBER!>kotlin.internal.<!INVISIBLE_REFERENCE!>InlineOnly<!><!>
public inline fun <C, R> C.ifEmpty(f: () -> R): R where C : Collection<*>, C : R = if (isEmpty()) f() else this
public fun <T> listOf(<!UNUSED_PARAMETER!>t<!>: T): List<T> = TODO()
public fun <T> listOf(t: T): List<T> = TODO()
fun usage(c: List<String>) {
@@ -4,9 +4,9 @@ package Hello
open class Base<T>
class StringBase : Base<String>()
class Client<T, X: Base<T>>(<!UNUSED_PARAMETER!>x<!>: X)
class Client<T, X: Base<T>>(x: X)
fun test() {
val c = Client(StringBase()) // Type inference fails here for T.
val <!UNUSED_VARIABLE!>i<!> : Int = <!TYPE_MISMATCH!>c<!>
}
val i : Int = <!TYPE_MISMATCH!>c<!>
}
@@ -1,8 +1,8 @@
// !WITH_NEW_INFERENCE
package a
fun <V: U, U> foo(<!UNUSED_PARAMETER!>v<!>: V, u: U) = u
fun <U, V: U> bar(<!UNUSED_PARAMETER!>v<!>: V, u: U) = u
fun <V: U, U> foo(v: V, u: U) = u
fun <U, V: U> bar(v: V, u: U) = u
fun test(a: Any, s: String) {
val b = foo(a, s)
@@ -11,13 +11,13 @@ fun test(a: Any, s: String) {
checkItIsExactlyAny(a, arrayListOf(c))
}
fun <T> checkItIsExactlyAny(<!UNUSED_PARAMETER!>t<!>: T, <!UNUSED_PARAMETER!>l<!>: MutableList<T>) {}
fun <T> checkItIsExactlyAny(t: T, l: MutableList<T>) {}
fun <V : U, U> baz(<!UNUSED_PARAMETER!>v<!>: V, u: MutableSet<U>) = u
fun <V : U, U> baz(v: V, u: MutableSet<U>) = u
fun test(a: Any, s: MutableSet<String>) {
<!TYPE_INFERENCE_UPPER_BOUND_VIOLATED{OI}!>baz<!>(a, <!TYPE_MISMATCH{NI}, TYPE_MISMATCH{NI}!>s<!>)
}
//from standard library
fun <T> arrayListOf(vararg <!UNUSED_PARAMETER!>t<!>: T): MutableList<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>
fun <T> arrayListOf(vararg t: T): MutableList<T> {<!NO_RETURN_IN_FUNCTION_WITH_BLOCK_BODY!>}<!>