Files
kotlin-fork/compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt
T
2021-05-25 13:28:29 +03:00

17 lines
374 B
Kotlin
Vendored

// FIR_IDENTICAL
// !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
{ } <!USELESS_ELVIS!>?: 1<!>
use({ 2 } <!USELESS_ELVIS!>?: 1<!>);
1 <!USELESS_ELVIS!>?: { }<!>
use(1 <!USELESS_ELVIS!>?: { }<!>)
}