[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
@@ -4,6 +4,6 @@ fun foo(x: Any, y: Int) = y
fun main() {
::<!UNRESOLVED_REFERENCE!>foo<!>
val fooRef: (Int, Any) -> Unit = ::<!UNRESOLVED_REFERENCE!>foo<!>
}
@@ -1,9 +1,9 @@
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_VARIABLE
fun foo(x: Int, <!UNUSED_PARAMETER!>y<!>: Any) = x
fun foo(<!UNUSED_PARAMETER!>x<!>: Any, y: Int) = y
fun foo(x: Int, y: Any) = x
fun foo(x: Any, y: Int) = y
fun main() {
::<!OVERLOAD_RESOLUTION_AMBIGUITY!>foo<!>
val fooRef: (Int, Any) -> Unit = ::<!NONE_APPLICABLE!>foo<!>
}
@@ -16,6 +16,6 @@ fun test() {
Outer.Companion::Wrapper
(Outer.Companion)::<!UNRESOLVED_REFERENCE!>Wrapper<!>
<!UNUSED_EXPRESSION!>Outer::<!UNRESOLVED_REFERENCE!>Wrapper<!><!>
Outer::<!UNRESOLVED_REFERENCE!>Wrapper<!>
(Outer)::<!UNRESOLVED_REFERENCE!>Wrapper<!>
}
@@ -1,30 +0,0 @@
// !CHECK_TYPE
// FILE: a.kt
package first
import checkSubtype
class A {
fun foo() {}
fun bar(x: Int) {}
fun baz() = "OK"
}
// FILE: b.kt
package other
import kotlin.reflect.*
import checkSubtype
import first.A
fun main() {
val x = first.A::foo
val y = first.A::bar
val z = A::baz
checkSubtype<KFunction1<A, Unit>>(x)
checkSubtype<KFunction2<A, Int, Unit>>(y)
checkSubtype<KFunction1<A, String>>(z)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
// FILE: a.kt
@@ -7,7 +8,7 @@ import checkSubtype
class A {
fun foo() {}
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun bar(x: Int) {}
fun baz() = "OK"
}
@@ -1,31 +0,0 @@
// !CHECK_TYPE
// FILE: a.kt
package first
import checkSubtype
fun foo() {}
fun bar(x: Int) {}
fun baz() = "OK"
// FILE: b.kt
package other
import kotlin.reflect.*
import first.foo
import first.bar
import first.baz
import checkSubtype
fun main() {
val x = ::foo
val y = ::bar
val z = ::baz
checkSubtype<KFunction0<Unit>>(x)
checkSubtype<KFunction1<Int, Unit>>(y)
checkSubtype<KFunction0<String>>(z)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
// FILE: a.kt
@@ -6,7 +7,7 @@ package first
import checkSubtype
fun foo() {}
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun bar(x: Int) {}
fun baz() = "OK"
// FILE: b.kt
@@ -1,23 +0,0 @@
// !CHECK_TYPE
import kotlin.reflect.*
class A
fun A.foo() {}
fun A.bar(x: Int) {}
fun A.baz() = "OK"
fun main() {
val x = A::foo
val y = A::bar
val z = A::baz
checkSubtype<KFunction1<A, Unit>>(x)
checkSubtype<KFunction2<A, Int, Unit>>(y)
checkSubtype<KFunction1<A, String>>(z)
checkSubtype<KFunction<Unit>>(x)
checkSubtype<KFunction<Unit>>(y)
checkSubtype<KFunction<String>>(z)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
import kotlin.reflect.*
@@ -5,7 +6,7 @@ import kotlin.reflect.*
class A
fun A.foo() {}
fun A.bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun A.bar(x: Int) {}
fun A.baz() = "OK"
fun main() {
@@ -16,4 +16,4 @@ fun <T> foo() = <!CALLABLE_REFERENCE_LHS_NOT_A_CLASS!>T::<!UNRESOLVED_REFERENCE!
fun <U : Any> bar() = <!CALLABLE_REFERENCE_LHS_NOT_A_CLASS!>U::<!UNRESOLVED_REFERENCE!>toString<!><!>
fun take(<!UNUSED_PARAMETER!>arg<!>: Any) {}
fun take(arg: Any) {}
@@ -1,17 +0,0 @@
// !CHECK_TYPE
import kotlin.reflect.*
fun main() {
fun foo() {}
fun bar(x: Int) {}
fun baz() = "OK"
val x = ::foo
val y = ::bar
val z = ::baz
checkSubtype<KFunction0<Unit>>(x)
checkSubtype<KFunction1<Int, Unit>>(y)
checkSubtype<KFunction0<String>>(z)
}
@@ -1,16 +1,17 @@
// FIR_IDENTICAL
// !CHECK_TYPE
import kotlin.reflect.*
fun main() {
fun foo() {}
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun bar(x: Int) {}
fun baz() = "OK"
val x = ::foo
val y = ::bar
val z = ::baz
checkSubtype<KFunction0<Unit>>(x)
checkSubtype<KFunction1<Int, Unit>>(y)
checkSubtype<KFunction0<String>>(z)
@@ -1,23 +0,0 @@
// !CHECK_TYPE
import kotlin.reflect.*
class A
fun main() {
fun foo() {}
fun bar(x: Int) {}
fun baz() = "OK"
class B {
fun A.ext() {
val x = ::foo
val y = ::bar
val z = ::baz
checkSubtype<KFunction0<Unit>>(x)
checkSubtype<KFunction1<Int, Unit>>(y)
checkSubtype<KFunction0<String>>(z)
}
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
import kotlin.reflect.*
@@ -6,9 +7,9 @@ class A
fun main() {
fun foo() {}
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun bar(x: Int) {}
fun baz() = "OK"
class B {
fun A.ext() {
val x = ::foo
@@ -1,21 +0,0 @@
// !CHECK_TYPE
import kotlin.reflect.*
fun main() {
fun foo() {}
fun bar(x: Int) {}
fun baz() = "OK"
class A {
val x = ::foo
val y = ::bar
val z = ::baz
fun main() {
checkSubtype<KFunction0<Unit>>(x)
checkSubtype<KFunction1<Int, Unit>>(y)
checkSubtype<KFunction0<String>>(z)
}
}
}
@@ -1,12 +1,13 @@
// FIR_IDENTICAL
// !CHECK_TYPE
import kotlin.reflect.*
fun main() {
fun foo() {}
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun bar(x: Int) {}
fun baz() = "OK"
class A {
val x = ::foo
val y = ::bar
@@ -1,21 +0,0 @@
// !CHECK_TYPE
import kotlin.reflect.*
class A
fun main() {
fun foo() {}
fun bar(x: Int) {}
fun baz() = "OK"
fun A.ext() {
val x = ::foo
val y = ::bar
val z = ::baz
checkSubtype<KFunction0<Unit>>(x)
checkSubtype<KFunction1<Int, Unit>>(y)
checkSubtype<KFunction0<String>>(z)
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
import kotlin.reflect.*
@@ -6,9 +7,9 @@ class A
fun main() {
fun foo() {}
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun bar(x: Int) {}
fun baz() = "OK"
fun A.ext() {
val x = ::foo
val y = ::bar
@@ -1,18 +0,0 @@
// !CHECK_TYPE
// FILE: a.kt
package a.b.c
class D<E, F> {
fun foo(e: E, f: F) = this
}
// FILE: b.kt
import kotlin.reflect.KFunction3
fun main() {
val x = a.b.c.D<String, Int>::foo
checkSubtype<KFunction3<a.b.c.D<String, Int>, String, Int, a.b.c.D<String, Int>>>(x)
}
@@ -1,10 +1,11 @@
// FIR_IDENTICAL
// !CHECK_TYPE
// FILE: a.kt
package a.b.c
class D<E, F> {
fun foo(<!UNUSED_PARAMETER!>e<!>: E, <!UNUSED_PARAMETER!>f<!>: F) = this
fun foo(e: E, f: F) = this
}
// FILE: b.kt
@@ -1,23 +0,0 @@
// !CHECK_TYPE
import kotlin.reflect.*
class A {
fun foo() {}
fun bar(x: Int) {}
fun baz() = "OK"
}
fun main() {
val x = A::foo
val y = A::bar
val z = A::baz
checkSubtype<KFunction1<A, Unit>>(x)
checkSubtype<KFunction2<A, Int, Unit>>(y)
checkSubtype<KFunction1<A, String>>(z)
checkSubtype<KFunction<Unit>>(x)
checkSubtype<KFunction<Unit>>(y)
checkSubtype<KFunction<String>>(z)
}
@@ -1,10 +1,11 @@
// FIR_IDENTICAL
// !CHECK_TYPE
import kotlin.reflect.*
class A {
fun foo() {}
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun bar(x: Int) {}
fun baz() = "OK"
}
@@ -1,30 +0,0 @@
// !CHECK_TYPE
// FILE: a.kt
package other
fun foo() {}
class A {
fun bar() = 42
}
fun A.baz(x: String) {}
// FILE: b.kt
import kotlin.reflect.*
import other.foo as foofoo
import other.A as AA
import other.baz as bazbaz
fun main() {
val x = ::foofoo
val y = AA::bar
val z = AA::bazbaz
checkSubtype<KFunction0<Unit>>(x)
checkSubtype<KFunction1<AA, Int>>(y)
checkSubtype<KFunction2<AA, String, Unit>>(z)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
// FILE: a.kt
@@ -9,7 +10,7 @@ class A {
fun bar() = 42
}
fun A.baz(<!UNUSED_PARAMETER!>x<!>: String) {}
fun A.baz(x: String) {}
// FILE: b.kt
@@ -1,19 +0,0 @@
// !CHECK_TYPE
import kotlin.reflect.*
fun foo() {}
fun bar(x: Int) {}
fun baz() = "OK"
class A {
fun main() {
val x = ::foo
val y = ::bar
val z = ::baz
checkSubtype<KFunction0<Unit>>(x)
checkSubtype<KFunction1<Int, Unit>>(y)
checkSubtype<KFunction0<String>>(z)
}
}
@@ -1,9 +1,10 @@
// FIR_IDENTICAL
// !CHECK_TYPE
import kotlin.reflect.*
fun foo() {}
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun bar(x: Int) {}
fun baz() = "OK"
class A {
@@ -1,19 +0,0 @@
// !CHECK_TYPE
import kotlin.reflect.*
class A
fun foo() {}
fun bar(x: Int) {}
fun baz() = "OK"
fun A.main() {
val x = ::foo
val y = ::bar
val z = ::baz
checkSubtype<KFunction0<Unit>>(x)
checkSubtype<KFunction1<Int, Unit>>(y)
checkSubtype<KFunction0<String>>(z)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
import kotlin.reflect.*
@@ -5,7 +6,7 @@ import kotlin.reflect.*
class A
fun foo() {}
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun bar(x: Int) {}
fun baz() = "OK"
fun A.main() {
@@ -1,21 +0,0 @@
// !CHECK_TYPE
import kotlin.reflect.*
class A
fun foo() {}
fun bar(x: Int) {}
fun baz() = "OK"
class B {
fun A.main() {
val x = ::foo
val y = ::bar
val z = ::baz
checkSubtype<KFunction0<Unit>>(x)
checkSubtype<KFunction1<Int, Unit>>(y)
checkSubtype<KFunction0<String>>(z)
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
import kotlin.reflect.*
@@ -5,7 +6,7 @@ import kotlin.reflect.*
class A
fun foo() {}
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun bar(x: Int) {}
fun baz() = "OK"
class B {
@@ -1,17 +0,0 @@
// !CHECK_TYPE
import kotlin.reflect.*
fun foo() {}
fun bar(x: Int) {}
fun baz() = "OK"
fun main() {
val x = ::foo
val y = ::bar
val z = ::baz
checkSubtype<KFunction0<Unit>>(x)
checkSubtype<KFunction1<Int, Unit>>(y)
checkSubtype<KFunction0<String>>(z)
}
@@ -1,9 +1,10 @@
// FIR_IDENTICAL
// !CHECK_TYPE
import kotlin.reflect.*
fun foo() {}
fun bar(<!UNUSED_PARAMETER!>x<!>: Int) {}
fun bar(x: Int) {}
fun baz() = "OK"
fun main() {
@@ -4,7 +4,7 @@
class A
fun test1() {
val <!UNUSED_VARIABLE!>foo<!> = ::<!UNRESOLVED_REFERENCE!>foo<!>
val foo = ::<!UNRESOLVED_REFERENCE!>foo<!>
::<!UNRESOLVED_REFERENCE!>bar<!>