[FIR] Properly handle when subject expression in DFA of equality calls

^KT-50785 Fixed
This commit is contained in:
Dmitriy Novozhilov
2022-01-17 14:32:13 +03:00
parent 57346bac54
commit 8daf7774ba
7 changed files with 87 additions and 1 deletions
@@ -0,0 +1,19 @@
// ISSUE: KT-50785
fun test_1(s: String?) {
when (true) {
(s != null) -> s.length
else -> null
}
}
fun test_2(s: String?) {
when (s != null) {
true -> s.length
else -> null
}
}
fun test_3(s: String?) {
if (true == (s != null)) s.length
}