// !LANGUAGE: +NewInference // !DIAGNOSTICS: -NAME_SHADOWING -UNUSED_VARIABLE -UNUSED_EXPRESSION fun foo1(x: Int) { val x = if (true) { // OI: Map?, NI: Nothing?, error "" to { x } } else { null } kotlin.Int>?")!>x } fun foo2(x: Int) { val x = if (true) { mapOf("" to { x }) // `Map` is in type info in IDE } else { null } // Fixed the problem: "type of entire `if` is `Map?` (NI) instead of `Map?` (OI)" kotlin.Int>?")!>x }