[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
@@ -1,14 +0,0 @@
class A {
operator fun component1() = 1
operator fun component2() = 1
}
class C {
operator fun iterator(): Iterator<A> = null!!
}
fun test() {
for ((x, y) in C()) {
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class A {
operator fun component1() = 1
operator fun component2() = 1
@@ -8,7 +9,7 @@ class C {
}
fun test() {
for ((<!UNUSED_VARIABLE!>x<!>, <!UNUSED_VARIABLE!>y<!>) in C()) {
for ((x, y) in C()) {
}
}
@@ -9,7 +9,7 @@ class C {
}
fun test() {
for ((<!UNUSED_VARIABLE!>x<!>: Double, <!UNUSED_VARIABLE!>y<!>: Int) in <!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH, COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH!>C()<!>) {
for ((x: Double, y: Int) in <!COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH, COMPONENT_FUNCTION_RETURN_TYPE_MISMATCH!>C()<!>) {
}
}
@@ -1,15 +0,0 @@
class A {
<!CONFLICTING_OVERLOADS!>operator fun component1()<!> = 1
<!CONFLICTING_OVERLOADS!>operator fun component1()<!> = 1
operator fun component2() = 1
}
class C {
operator fun iterator(): Iterator<A> = null!!
}
fun test() {
for ((x, y) in <!COMPONENT_FUNCTION_AMBIGUITY!>C()<!>) {
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class A {
<!CONFLICTING_OVERLOADS!>operator fun component1()<!> = 1
<!CONFLICTING_OVERLOADS!>operator fun component1()<!> = 1
@@ -9,7 +10,7 @@ class C {
}
fun test() {
for ((<!UNUSED_VARIABLE!>x<!>, <!UNUSED_VARIABLE!>y<!>) in <!COMPONENT_FUNCTION_AMBIGUITY!>C()<!>) {
for ((x, y) in <!COMPONENT_FUNCTION_AMBIGUITY!>C()<!>) {
}
}
@@ -1,13 +0,0 @@
class A {
operator fun component1() = 1
}
class C {
operator fun iterator(): Iterator<A> = null!!
}
fun test() {
for ((x, y) in <!COMPONENT_FUNCTION_MISSING!>C()<!>) {
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class A {
operator fun component1() = 1
}
@@ -7,7 +8,7 @@ class C {
}
fun test() {
for ((<!UNUSED_VARIABLE!>x<!>, <!UNUSED_VARIABLE!>y<!>) in <!COMPONENT_FUNCTION_MISSING!>C()<!>) {
for ((x, y) in <!COMPONENT_FUNCTION_MISSING!>C()<!>) {
}
}
@@ -1,13 +1,13 @@
// !WITH_NEW_INFERENCE
fun useDeclaredVariables() {
for ((a, b)<!SYNTAX!><!>) {
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, UNUSED_EXPRESSION!>a<!>
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, UNUSED_EXPRESSION!>b<!>
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>b<!>
}
}
fun checkersShouldRun() {
for ((@A <!UNUSED_VARIABLE!>a<!>, _)<!SYNTAX!><!>) {
for ((@A a, _)<!SYNTAX!><!>) {
}
}
@@ -1,14 +0,0 @@
class A {
}
operator fun A.component1() = 1
operator fun A.component2() = 1
class C {
operator fun iterator(): Iterator<A> = null!!
}
fun test() {
for ((x, y) in C()) {
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class A {
}
operator fun A.component1() = 1
@@ -8,7 +9,7 @@ class C {
}
fun test() {
for ((<!UNUSED_VARIABLE!>x<!>, <!UNUSED_VARIABLE!>y<!>) in C()) {
for ((x, y) in C()) {
}
}
@@ -1,14 +0,0 @@
class A {
operator fun component1() = 1
operator fun component2() = 1.0
}
class C {
operator fun iterator(): Iterator<A> = null!!
}
fun test() {
for ((x: Int, y: Double) in C()) {
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class A {
operator fun component1() = 1
operator fun component2() = 1.0
@@ -8,7 +9,7 @@ class C {
}
fun test() {
for ((<!UNUSED_VARIABLE!>x<!>: Int, <!UNUSED_VARIABLE!>y<!>: Double) in C()) {
for ((x: Int, y: Double) in C()) {
}
}
@@ -8,7 +8,7 @@ class C {
}
fun test() {
for ((<!REDECLARATION, UNUSED_VARIABLE!>x<!>, <!NAME_SHADOWING, REDECLARATION, UNUSED_VARIABLE!>x<!>) in C()) {
for ((<!REDECLARATION!>x<!>, <!NAME_SHADOWING, REDECLARATION!>x<!>) in C()) {
}
}
@@ -1,13 +0,0 @@
class A {
operator fun component1() = 1
}
class C {
operator fun iterator(): Iterator<A> = null!!
}
fun test() {
for ((x) in C()) {
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
class A {
operator fun component1() = 1
}
@@ -7,7 +8,7 @@ class C {
}
fun test() {
for ((<!UNUSED_VARIABLE!>x<!>) in C()) {
for ((x) in C()) {
}
}
@@ -1,11 +1,11 @@
fun useDeclaredVariables() {
val (a, b) = <!UNRESOLVED_REFERENCE!>unresolved<!>
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, UNUSED_EXPRESSION!>a<!>
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, UNUSED_EXPRESSION!>b<!>
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>b<!>
}
fun checkersShouldRun() {
val (@A <!UNUSED_VARIABLE!>a<!>, _) = <!UNRESOLVED_REFERENCE!>unresolved<!>
val (@A a, _) = <!UNRESOLVED_REFERENCE!>unresolved<!>
}
annotation class A
@@ -1,11 +1,11 @@
fun useDeclaredVariables() {
<!INITIALIZER_REQUIRED_FOR_DESTRUCTURING_DECLARATION!>val (a, b)<!>
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, UNUSED_EXPRESSION!>a<!>
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, UNUSED_EXPRESSION!>b<!>
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>a<!>
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>b<!>
}
fun checkersShouldRun() {
<!INITIALIZER_REQUIRED_FOR_DESTRUCTURING_DECLARATION!>val (@A <!UNUSED_VARIABLE!>a<!>, _)<!>
<!INITIALIZER_REQUIRED_FOR_DESTRUCTURING_DECLARATION!>val (@A a, _)<!>
}
annotation class A
@@ -45,7 +45,7 @@ fun test() {
foo(<!TYPE_MISMATCH, UNDERSCORE_USAGE_WITHOUT_BACKTICKS!>_<!>, y)
val (<!UNUSED_VARIABLE!>unused<!>, _) = A()
val (unused, _) = A()
}
fun foo(<!UNUSED_PARAMETER!>x<!>: Int, <!UNUSED_PARAMETER!>y<!>: String) {}
fun foo(x: Int, y: String) {}