[FIR] Support boolean elvis bound smartcasts

#KT-44511 Fixed
This commit is contained in:
Dmitriy Novozhilov
2021-02-08 11:26:36 +03:00
committed by TeamCityServer
parent 2b088f1147
commit 9724d81a49
8 changed files with 98 additions and 6 deletions
@@ -11,13 +11,13 @@ interface Order {
fun foo(o: Any) {
val order = o as? Order
if (order?.expired ?: false) {
order<!UNSAFE_CALL!>.<!>doSomething()
order.doSomething()
}
else {
}
if (order?.notExpired() ?: false) {
order<!UNSAFE_CALL!>.<!>doSomething()
order.doSomething()
}
}
@@ -47,4 +47,4 @@ fun baz(o: Boolean?) {
else {
o<!UNSAFE_CALL!>.<!>hashCode()
}
}
}