Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/smartcasts/longElvisChain.kt
T
2023-02-14 17:08:54 +00:00

18 lines
383 B
Kotlin
Vendored

// ISSUE: KT-49249
// WITH_STDLIB
fun test_1() {
val a: Throwable? = null;
val b: Unit? = null
val c = a ?: b?.let { return it } ?: return
c<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>
throw <!TYPE_MISMATCH!>a<!>
}
fun test_2() {
val a: Throwable? = null;
val b: Unit? = null
val c = a ?: b?.let { return it } ?: return
throw <!TYPE_MISMATCH!>a<!>
}