[FIR] Properly support smartcasts on stable when subjects in when conditions

^KT-49860 Fixed
This commit is contained in:
Dmitriy Novozhilov
2021-11-24 17:14:21 +03:00
committed by teamcityserver
parent 20425fb458
commit 330574cab6
41 changed files with 1225 additions and 791 deletions
@@ -39,7 +39,7 @@ fun testSmartCastInWhenConditionInBranch(x: Any): Int {
val tmp3_subject: Any = x
when {
tmp3_subject !is Double -> -1
EQEQ(arg0 = tmp3_subject, arg1 = 0.0) -> 0
ieee754equals(arg0 = tmp3_subject /*as Double */, arg1 = 0.0) -> 0
else -> 1
}
}
@@ -77,3 +77,4 @@ fun testWithPrematureExitInConditionSubexpression(x: Any): Int {
}
}
}