[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
@@ -5,7 +5,7 @@ package outer
fun Int?.optint() : Unit {}
val Int?.optval : Unit get() = Unit
fun <T: Any, E> T.foo(<!UNUSED_PARAMETER!>x<!> : E, y : A) : T {
fun <T: Any, E> T.foo(x : E, y : A) : T {
y.plus(1)
y plus 1
y + 1.0
@@ -17,22 +17,22 @@ fun <T: Any, E> T.foo(<!UNUSED_PARAMETER!>x<!> : E, y : A) : T {
class A
infix operator fun A.plus(<!UNUSED_PARAMETER!>a<!> : Any) {
infix operator fun A.plus(a : Any) {
1.foo()
true.<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER{NI}, TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER{OI}!>foo<!>(<!NO_VALUE_FOR_PARAMETER, NO_VALUE_FOR_PARAMETER!>)<!>
<!UNUSED_EXPRESSION!>1<!>
1
}
operator fun A.plus(<!UNUSED_PARAMETER!>a<!> : Int) {
<!UNUSED_EXPRESSION!>1<!>
operator fun A.plus(a : Int) {
1
}
operator fun <T> T.minus(<!UNUSED_PARAMETER!>t<!> : T) : Int = 1
operator fun <T> T.minus(t : T) : Int = 1
fun test() {
val <!UNUSED_VARIABLE!>y<!> = 1.abs
val y = 1.abs
}
val Int.abs : Int
get() = if (this > 0) this else -this;
@@ -46,15 +46,15 @@ package null_safety
import outer.*
fun parse(<!UNUSED_PARAMETER!>cmd<!>: String): Command? { return null }
fun parse(cmd: String): Command? { return null }
class Command() {
// fun equals(other : Any?) : Boolean
val foo : Int = 0
}
fun Any.<!EXTENSION_SHADOWED_BY_MEMBER!>equals<!>(<!UNUSED_PARAMETER!>other<!> : Any?) : Boolean = true
fun Any?.equals1(<!UNUSED_PARAMETER!>other<!> : Any?) : Boolean = true
fun Any.equals2(<!UNUSED_PARAMETER!>other<!> : Any?) : Boolean = true
fun Any.<!EXTENSION_SHADOWED_BY_MEMBER!>equals<!>(other : Any?) : Boolean = true
fun Any?.equals1(other : Any?) : Boolean = true
fun Any.equals2(other : Any?) : Boolean = true
fun main() {
@@ -72,5 +72,5 @@ import outer.*
val c = Command()
c<!UNNECESSARY_SAFE_CALL!>?.<!>equals2(null)
if (command == null) <!UNUSED_EXPRESSION!>1<!>
if (command == null) 1
}
+2 -2
View File
@@ -5,7 +5,7 @@ package bar
import java.io.File
class Customer(<!UNUSED_PARAMETER!>name1<!>: String)
class Customer(name1: String)
fun foo(f: File, c: Customer) {
f.name1
@@ -14,4 +14,4 @@ fun foo(f: File, c: Customer) {
}
val File.name1: String
get() = getName()
get() = getName()
@@ -4,12 +4,12 @@ package a
class A {}
fun test(a1: A, a2: A) {
val <!UNUSED_VARIABLE!>range<!> = "island".."isle"
val range = "island".."isle"
a1<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>..<!>a2
}
public operator fun <T: Comparable<T>> T.rangeTo(<!UNUSED_PARAMETER!>that<!>: T): ClosedRange<T> {
public operator fun <T: Comparable<T>> T.rangeTo(that: T): ClosedRange<T> {
throw UnsupportedOperationException()
}
}