Fix tests in DiagnosticsTestWithStdLibGenerated with NI

This commit is contained in:
Dmitriy Novozhilov
2019-01-30 13:08:22 +03:00
parent 98810ba750
commit 0501a108c0
73 changed files with 507 additions and 218 deletions
@@ -1,9 +1,10 @@
// !WITH_NEW_INFERENCE
// KT-7186: False "Type mismatch" error
fun indexOfMax(a: IntArray): Int? {
var maxI: Int? = null
a.forEachIndexed { i, value ->
if (maxI == null || value >= a[<!SMARTCAST_IMPOSSIBLE!>maxI<!>]) {
if (maxI == null || value >= a[<!NI;SMARTCAST_IMPOSSIBLE, SMARTCAST_IMPOSSIBLE!>maxI<!>]) {
maxI = i
}
}