[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
@@ -55,7 +55,7 @@ fun test4() {
fun test5() {
var a: Int?// = null
try {
<!UNUSED_VALUE!>a =<!> 3
a = 3
}
catch (e: Exception) {
return
@@ -68,7 +68,7 @@ fun test5() {
fun test6() {
var a: Int?// = null
try {
<!UNUSED_VALUE!>a =<!> 3
a = 3
}
catch (e: Exception) {
return
@@ -9,7 +9,7 @@ fun IntArray.forEachIndexed( op: (i: Int, value: Int) -> Unit) {
fun max(a: IntArray): Int? {
var maxI: Int? = null
a.forEachIndexed { i, value ->
if (maxI == null || value >= a[<!SMARTCAST_IMPOSSIBLE{NI}, SMARTCAST_IMPOSSIBLE!>maxI<!>])
if (maxI == null || value >= a[<!SMARTCAST_IMPOSSIBLE, SMARTCAST_IMPOSSIBLE!>maxI<!>])
maxI = i
}
return maxI
@@ -1,9 +0,0 @@
public fun foo() {
var i: Int? = 1
if (i != null) {
while (i != 10) {
i<!UNSAFE_CALL!>++<!> // Here smart cast should not be performed due to a successor
i = null
}
}
}
@@ -1,9 +1,10 @@
// FIR_IDENTICAL
public fun foo() {
var i: Int? = 1
if (i != null) {
while (i != 10) {
<!UNUSED_CHANGED_VALUE!>i<!UNSAFE_CALL!>++<!><!> // Here smart cast should not be performed due to a successor
i<!UNSAFE_CALL!>++<!> // Here smart cast should not be performed due to a successor
i = null
}
}
}
}