[FIR] Don't create smartcast node if smartcasted type is equal to original type

This commit is contained in:
Dmitriy Novozhilov
2021-02-19 17:47:44 +03:00
parent 1c0d862e40
commit 469252f6b4
30 changed files with 272 additions and 271 deletions
@@ -63,7 +63,7 @@ fun case_6(x: EmptyClass) {
// TESTCASE NUMBER: 7
fun case_7() {
if (anonymousTypeProperty == null || <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any")!>anonymousTypeProperty<!> == null) {
if (anonymousTypeProperty == null || <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>anonymousTypeProperty<!> == null) {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>anonymousTypeProperty<!>
}
}
@@ -258,7 +258,7 @@ fun case_23(a: ((Float) -> Int), b: Float) {
if (a == null && b == null) {
val x = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float")!>b<!>)<!>
if (x !== null) {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>x<!>
}
}
}