Files
kotlin-fork/compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.fir.kt
T
2021-04-09 12:32:45 +03:00

17 lines
300 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_EXPRESSION
fun use(a: Any?) = a
fun test() {
{ }<!NOT_NULL_ASSERTION_ON_LAMBDA_EXPRESSION!>!!<!>
use({ }<!NOT_NULL_ASSERTION_ON_LAMBDA_EXPRESSION!>!!<!>);
// KT-KT-9070
{ } ?: 1
use({ 2 } ?: 1);
1 ?: { }
use(1 ?: { })
}