KT-5773 Smart cast doesn't work with Nothing on the rhs of "?:"
#KT-5773 FIxed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class C {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
fun test(a: C?, nn: () -> Nothing?) {
|
||||
a ?: nn()
|
||||
a<!UNSAFE_CALL!>.<!>foo()
|
||||
|
||||
a ?: return
|
||||
<!DEBUG_INFO_AUTOCAST!>a<!>.foo()
|
||||
}
|
||||
Reference in New Issue
Block a user