FIR DFA: x !is T? => x != null
^KT-22996 tag fixed-in-k2
This commit is contained in:
@@ -46,8 +46,8 @@ fun case_4(x: Any) {
|
||||
fun case_5(x: Any?) {
|
||||
if (!(x !is Class.NestedClass?)) {
|
||||
if (!!(<!USELESS_IS_CHECK!>x !is Class.NestedClass?<!>)) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & Class.NestedClass?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & Class.NestedClass?")!>x<!>?.prop_4
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & Class.NestedClass")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & Class.NestedClass")!>x<!><!UNNECESSARY_SAFE_CALL!>?.<!>prop_4
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,8 +76,8 @@ fun case_7(x: Any) {
|
||||
fun case_8(x: Any?) {
|
||||
if (!!!!(x is Int?)) else {
|
||||
if (!(x is Int?)) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int?")!>x<!>?.inv()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int")!>x<!><!UNNECESSARY_SAFE_CALL!>?.<!>inv()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,8 +86,8 @@ fun case_8(x: Any?) {
|
||||
fun case_9(x: Any?) {
|
||||
if (!!!(x !is TypealiasNullableStringIndirect<!REDUNDANT_NULLABLE!>?<!>)) else {
|
||||
if (!!(x !is TypealiasNullableStringIndirect<!REDUNDANT_NULLABLE!>?<!>)) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & TypealiasNullableStringIndirect?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & TypealiasNullableStringIndirect?")!>x<!>?.get(0)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any & TypealiasNullableStringIndirect")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any & TypealiasNullableStringIndirect")!>x<!><!UNNECESSARY_SAFE_CALL!>?.<!>get(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ fun case_10(x: Any?) {
|
||||
if (x is ClassLevel1? && x is ClassLevel2? && x is ClassLevel3?) {
|
||||
if (x is ClassLevel4?) {
|
||||
|
||||
} else if (x is ClassLevel5? && x != null) {
|
||||
} else if (x is ClassLevel5? && <!SENSELESS_COMPARISON!>x != null<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.propT
|
||||
@@ -224,7 +224,7 @@ fun case_10(x: Any?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.test4()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.test5()
|
||||
}
|
||||
} else if (x is ClassLevel4? && x != null && x is ClassLevel5?) {
|
||||
} else if (x is ClassLevel4? && <!SENSELESS_COMPARISON!>x != null<!> && x is ClassLevel5?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.propT
|
||||
|
||||
@@ -1255,7 +1255,7 @@ fun case_70(x: Any?) {
|
||||
if (x is ClassLevel1? && x is ClassLevel2? && x is ClassLevel3?) {
|
||||
if (x is ClassLevel4?) {
|
||||
|
||||
} else if (x is ClassLevel5? && x != nullableNothingProperty || x != implicitNullableNothingProperty) {
|
||||
} else if (x is ClassLevel5? && <!SENSELESS_COMPARISON!>x != nullableNothingProperty<!> || <!SENSELESS_COMPARISON!>x != implicitNullableNothingProperty<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel3")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel3")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel3")!>x<!>.propT
|
||||
@@ -1267,7 +1267,7 @@ fun case_70(x: Any?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel3")!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel3")!>x<!>.funNullableAny()
|
||||
}
|
||||
} else if (x is ClassLevel4? && x !== nullableNothingProperty && x is ClassLevel5?) {
|
||||
} else if (x is ClassLevel4? && <!SENSELESS_COMPARISON!>x !== nullableNothingProperty<!> && x is ClassLevel5?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & ClassLevel5")!>x<!>.propT
|
||||
|
||||
@@ -59,7 +59,7 @@ fun case_7(x: Any?) {
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: Any?) {
|
||||
if (x as String? == null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.String?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.String?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Nothing?")!>x<!><!UNSAFE_CALL!>.<!>length
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user