Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/contracts/fromStdlib/isNullOrEmpty.fir.kt
T

21 lines
466 B
Kotlin
Vendored

// !LANGUAGE: +ReadDeserializedContracts +UseReturnsEffect
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
fun testIsNullOrEmpty(x: String?) {
if (x.isNullOrEmpty()) {
x.<!INAPPLICABLE_CANDIDATE!>length<!>
}
else {
x.<!INAPPLICABLE_CANDIDATE!>length<!>
}
}
fun testIsNotNullOrEmpty(x: String?) {
if (!x.isNullOrEmpty()) {
x.<!INAPPLICABLE_CANDIDATE!>length<!>
}
x.<!INAPPLICABLE_CANDIDATE!>length<!>
}