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

21 lines
408 B
Kotlin
Vendored

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