[FIR] Add test for KT-49249

This commit is contained in:
Dmitriy Novozhilov
2023-02-13 13:15:55 +02:00
committed by Space Team
parent 019d7db737
commit 092ebf4c11
6 changed files with 60 additions and 0 deletions
@@ -0,0 +1,17 @@
// 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<!>
}