FIR: intersect return types of declarations in intersection scopes

^KT-54378 Fixed
This commit is contained in:
pyos
2022-10-13 10:21:44 +02:00
committed by teamcity
parent 2879e7a74c
commit ee921412fc
11 changed files with 133 additions and 19 deletions
@@ -12,5 +12,5 @@ fun case_1() {
val strs = list as MutableList<String>
strs.add("two")
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.String> & kotlin.collections.MutableList<kotlin.Int> & kotlin.collections.MutableList<kotlin.String>")!>list<!>
val s: String = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH!><!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.String> & kotlin.collections.MutableList<kotlin.Int> & kotlin.collections.MutableList<kotlin.String>")!>list<!>[0]<!>
val s: String = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<kotlin.String> & kotlin.collections.MutableList<kotlin.Int> & kotlin.collections.MutableList<kotlin.String>")!>list<!>[0]
}