Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt36222.kt
T
Denis.Zharkov b94335dd1c FIR: Update diagnostics test data
Green code correctly became red
2021-05-20 17:24:30 +03:00

12 lines
260 B
Kotlin
Vendored

// FIR_IDENTICAL
// !LANGUAGE: +NewInference
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(f: () -> String) {}
fun <K> select(x: K, y: K): K = x
fun test() {
foo { <!TYPE_MISMATCH!>select("non-null", null)<!> } // inferred String? but String is expected
}