[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
+2
-2
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
-9
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user