[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
@@ -1,7 +1,7 @@
fun main(x1: Double?, range: ClosedRange<Double>) {
when (x1) {
null -> throw Exception()
<!ARGUMENT_TYPE_MISMATCH!>in range<!> -> {} // error, no smartcast from previous branch, OK in OI
in range -> {} // error, no smartcast from previous branch, OK in OI
}
when {