More precise diagnostics of smart cast impossible #KT-7240 Fixed
This commit is contained in:
+1
-1
@@ -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[<!TYPE_MISMATCH!>maxI<!>])
|
||||
if (maxI == null || value >= a[<!SMARTCAST_IMPOSSIBLE!>maxI<!>])
|
||||
maxI = i
|
||||
}
|
||||
return maxI
|
||||
|
||||
Reference in New Issue
Block a user