[FIR] Consider stability of receiver for DFA variables

^KT-57425 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-04-28 16:37:41 +03:00
committed by Space Team
parent d579798169
commit 1936658e40
9 changed files with 252 additions and 6 deletions
@@ -0,0 +1,14 @@
// FIR_IDENTICAL
// ISSUE: KT-57425
// WITH_STDLIB
data class Data(val x: Int?)
fun test(pair: Pair<String?, Data>) {
if (pair.second.x != null) {
<!SMARTCAST_IMPOSSIBLE!>pair.second.x<!>.inc() // should be an error
}
if (pair.first != null) {
<!SMARTCAST_IMPOSSIBLE!>pair.first<!>.length // should be an error
}
}