[Invariant Fix] Adjust DataFlowValue::Identifier for refinement

After refinement is introduced it becomes possible to have a different
descriptors instances for effectively the same descriptors

Also, it accidentally fixes KT-25432 because is caused by a different
version of descriptors created for NewCapturedType

^KT-25432 Fixed
This commit is contained in:
Denis Zharkov
2019-04-04 15:43:42 +03:00
committed by Dmitry Savvinov
parent 21cc93860b
commit daa27016ca
4 changed files with 145 additions and 143 deletions
@@ -18,7 +18,7 @@
fun case_1(x: Pair<*, *>) {
if (x.first !is String) return
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x.first<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x.first<!>.<!UNRESOLVED_REFERENCE!>length<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?"), SMARTCAST_IMPOSSIBLE!>x.first<!>.length
}
/*
@@ -28,5 +28,5 @@ fun case_1(x: Pair<*, *>) {
fun case_2(x: Pair<*, *>) {
if (x.first !is String?) throw Exception()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x.first<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x.first<!>?.<!UNRESOLVED_REFERENCE!>length<!>
}
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?"), SMARTCAST_IMPOSSIBLE!>x.first<!>?.length
}