Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/inference/kt37627.kt
T
Pavel Kirpichenkov e39b69839b [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
2020-03-26 17:06:37 +03:00

10 lines
233 B
Kotlin
Vendored

// 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 }
}