Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/coercionToUnit/lambdaWithNullableUnitInElvis.kt
T

9 lines
153 B
Kotlin
Vendored

// FIR_IDENTICAL
// SKIP_TXT
fun nullableF(): (() -> Unit)?= null
fun String.unit() {}
fun foo(x: String?): () -> Unit = nullableF() ?: { x?.unit() }