[NI] Make constraint check for type variables with complex dependency

Additional check for trivial constraints is needed to make lambda
analysis before outer variable fixation to Nothing(?)

^KT-37627 Fixed
This commit is contained in:
Pavel Kirpichenkov
2020-03-24 17:55:53 +03:00
parent 568b21e31c
commit e39b69839b
13 changed files with 208 additions and 3 deletions
@@ -0,0 +1,9 @@
// FIR_IDENTICAL
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -NAME_SHADOWING -UNUSED_VARIABLE
fun foo(x: Int) {
val x = if (true) { // OI: Map<String, () → Int>?, NI: Nothing?, error
"" to { x }
} else { null }
}
@@ -0,0 +1,3 @@
package
public fun foo(/*0*/ x: kotlin.Int): kotlin.Unit