[Test] Disable UNUSED_* diagnostics in tests which are not belong to contolFlowAnalysis suite
This commit is contained in:
committed by
TeamCityServer
parent
85949b387e
commit
cd890d5833
@@ -1,12 +1,12 @@
|
||||
// FILE: f.kt
|
||||
class A() {
|
||||
fun foo() : Unit {
|
||||
<!UNUSED_EXPRESSION!>this@A<!>
|
||||
this@A
|
||||
this<!UNRESOLVED_REFERENCE!>@a<!>
|
||||
<!UNUSED_EXPRESSION!>this<!>
|
||||
this
|
||||
}
|
||||
|
||||
val x = this@A.<!DEBUG_INFO_LEAKING_THIS!>foo<!>()
|
||||
val y = this.<!DEBUG_INFO_LEAKING_THIS!>foo<!>()
|
||||
val z = <!DEBUG_INFO_LEAKING_THIS!>foo<!>()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
// No supertype at all
|
||||
|
||||
fun Any.extension(<!UNUSED_PARAMETER!>arg<!>: Any?) {}
|
||||
fun Any.extension(arg: Any?) {}
|
||||
|
||||
class A1 {
|
||||
fun test() {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
fun any(<!UNUSED_PARAMETER!>a<!> : Any) {}
|
||||
fun any(a : Any) {}
|
||||
|
||||
fun notAnExpression() {
|
||||
any(<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>) // not an expression
|
||||
if (<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>) {} else {} // not an expression
|
||||
val <!UNUSED_VARIABLE!>x<!> = <!SUPER_IS_NOT_AN_EXPRESSION!>super<!> // not an expression
|
||||
val x = <!SUPER_IS_NOT_AN_EXPRESSION!>super<!> // not an expression
|
||||
when (1) {
|
||||
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!> -> <!UNUSED_EXPRESSION!>1<!> // not an expression
|
||||
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!> -> 1 // not an expression
|
||||
else -> {}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,15 +4,15 @@ class A(val a:Int) {
|
||||
inner class B() {
|
||||
fun Byte.xx() : Double.() -> Any {
|
||||
checkSubtype<Byte>(this)
|
||||
val <!UNUSED_VARIABLE!>a<!>: Double.() -> Unit = {
|
||||
val a: Double.() -> Unit = {
|
||||
checkSubtype<Double>(this)
|
||||
checkSubtype<Byte>(this@xx)
|
||||
checkSubtype<B>(this@B)
|
||||
checkSubtype<A>(this@A)
|
||||
}
|
||||
val <!UNUSED_VARIABLE!>b<!>: Double.() -> Unit = a@{ checkSubtype<Double>(this@a) + checkSubtype<Byte>(this@xx) }
|
||||
val <!UNUSED_VARIABLE!>c<!> = a@{ -> <!NO_THIS!>this@a<!> <!DEBUG_INFO_MISSING_UNRESOLVED!>+<!> checkSubtype<Byte>(this@xx) }
|
||||
val b: Double.() -> Unit = a@{ checkSubtype<Double>(this@a) + checkSubtype<Byte>(this@xx) }
|
||||
val c = a@{ -> <!NO_THIS!>this@a<!> <!DEBUG_INFO_MISSING_UNRESOLVED!>+<!> checkSubtype<Byte>(this@xx) }
|
||||
return (a@{checkSubtype<Double>(this@a) + checkSubtype<Byte>(this@xx)})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user