Don't report the same diagnsotics several times

This commit is contained in:
Victor Petukhov
2021-05-26 12:58:48 +03:00
parent e942052eb6
commit 4a767c597e
62 changed files with 202 additions and 166 deletions
@@ -8,7 +8,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, SMARTCAST_IMPOSSIBLE!>maxI<!>])
if (maxI == null || value >= a[<!SMARTCAST_IMPOSSIBLE!>maxI<!>])
maxI = i
}
return maxI