Files
kotlin-fork/compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.fir.kt
T

14 lines
229 B
Kotlin
Vendored

// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -USELESS_ELVIS
fun test() {
<!INAPPLICABLE_CANDIDATE!>bar<!>(if (true) {
1
} else {
2
})
<!INAPPLICABLE_CANDIDATE!>bar<!>(1 ?: 2)
}
fun bar(s: String) = s