[FIR] Fix K2 behavior according to RULES1
The compiler should only report diagnostics for
comparisons over builtins and identity-less types,
other incompatibilities should be reported
via inspections.
It's ok that in `equalityChecksOnIntegerTypes`
instead of `EQUALITY_NOT_APPLICABLE_WARNING` we get
`EQUALITY_NOT_APPLICABLE`, because
`ProperEqualityChecksInBuilderInferenceCalls`
is already active by default.
This change also replaces the notion of a representative superclass
with the least upper bound.
This makes complex types like
intersection/flexible transparent to
RULES1-based compatibility checks.
One way to look at it is to think
that this is an automatic way of handling
type parameters: automatic picking of
"interesting" bounds, and checking them against one another.
Note that `TypeIntersector.intersectTypes`
for `Int` and `T` where `T` is a type parameter
may return both `{Int & T}` or `null`
depending on `T`-s bounds. At the same time,
for type parameters `T` and `K` it will
always return `{T & K}`.
`ConeTypeIntersector.intersectTypes`, on the
other hand, will always return `{Int & T}`
irrespectively of the bounds. Meaning, the two
intersectors differ in corner cases.
`lowerBoundIfFlexible` call in `isLiterallyTypeParameter` is backed by
the `equalityOfFlexibleTypeParameters` test.
^KT-35134 #fixed-in-k2
^KT-22499 #fixed-in-k2
^KT-46383 #fixed-in-k2
This commit is contained in:
committed by
Space Team
parent
06e687addd
commit
f0720c1d12
@@ -21,7 +21,7 @@ fun case_1(x: Any?) {
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
fun case_3() {
|
||||
if (<!SENSELESS_COMPARISON!>Object.prop_1 == null !== null<!>)
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>Object.prop_1 == null !== null<!>)
|
||||
else {
|
||||
Object.prop_1
|
||||
Object.prop_1<!UNSAFE_CALL!>.<!>equals(null)
|
||||
@@ -56,7 +56,7 @@ fun case_4(x: Char?) {
|
||||
fun case_5() {
|
||||
val x: Unit? = null
|
||||
|
||||
if (<!EQUALITY_NOT_APPLICABLE!>x !== <!USELESS_IS_CHECK!>null is Boolean?<!><!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!>
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS!>x !== <!USELESS_IS_CHECK!>null is Boolean?<!><!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!>
|
||||
if (<!SENSELESS_COMPARISON!>x !== null == null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!><!UNSAFE_CALL!>.<!>equals(null)
|
||||
if (<!SENSELESS_COMPARISON!>x !== null == null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!>.propT
|
||||
if (<!SENSELESS_COMPARISON!>x !== null == null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Unit?")!>x<!><!UNSAFE_CALL!>.<!>propAny
|
||||
@@ -88,7 +88,7 @@ fun case_6(x: EmptyClass?) {
|
||||
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7() {
|
||||
if (nullableNumberProperty != null || <!SENSELESS_COMPARISON!><!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Nothing?")!>nullableNumberProperty<!> != null is Boolean<!>) {
|
||||
if (nullableNumberProperty != null || <!EQUALITY_NOT_APPLICABLE, SENSELESS_COMPARISON!><!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Nothing?")!>nullableNumberProperty<!> != null is Boolean<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number?")!>nullableNumberProperty<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number?")!>nullableNumberProperty<!><!UNSAFE_CALL!>.<!>equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number?")!>nullableNumberProperty<!>.propT
|
||||
@@ -104,13 +104,13 @@ fun case_7() {
|
||||
|
||||
// TESTCASE NUMBER: 8
|
||||
fun case_8(x: TypealiasNullableString) {
|
||||
if (<!SENSELESS_COMPARISON!>x !== null === null<!> && <!SENSELESS_COMPARISON!><!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!> != null != null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!><!UNSAFE_CALL!>.<!>get(0)
|
||||
if (<!SENSELESS_COMPARISON!>x !== null != null<!> && <!SENSELESS_COMPARISON!><!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!> != null === null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!><!UNSAFE_CALL!>.<!>get(0)
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>x !== null === null<!> && <!SENSELESS_COMPARISON!><!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!> != null != null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!><!UNSAFE_CALL!>.<!>get(0)
|
||||
if (<!SENSELESS_COMPARISON!>x !== null != null<!> && <!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!><!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!> != null === null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString")!>x<!><!UNSAFE_CALL!>.<!>get(0)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 9
|
||||
fun case_9(x: TypealiasNullableString<!REDUNDANT_NULLABLE!>?<!>) {
|
||||
if (<!SENSELESS_COMPARISON!>x === null === null<!>) {
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>x === null === null<!>) {
|
||||
|
||||
} else if (<!USELESS_IS_CHECK!>false is Boolean<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableString?")!>x<!>
|
||||
@@ -123,7 +123,7 @@ fun case_10() {
|
||||
val a = Class()
|
||||
|
||||
if (a.prop_4 === null || <!USELESS_IS_CHECK!>true is Boolean<!>) {
|
||||
if (<!SENSELESS_COMPARISON!>a.prop_4 != null !== null<!>) {
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>a.prop_4 != null !== null<!>) {
|
||||
a.prop_4
|
||||
a.prop_4<!UNSAFE_CALL!>.<!>equals(null)
|
||||
a.prop_4.propT
|
||||
@@ -166,8 +166,8 @@ fun case_11(x: TypealiasNullableStringIndirect<!REDUNDANT_NULLABLE!>?<!>, y: Typ
|
||||
|
||||
// TESTCASE NUMBER: 12
|
||||
fun case_12(x: TypealiasNullableStringIndirect, y: TypealiasNullableStringIndirect) =
|
||||
if (<!USELESS_IS_CHECK!>(x == null) !is Boolean<!> === false) "1"
|
||||
else if (<!USELESS_IS_CHECK!>(<!SENSELESS_COMPARISON!>y === null !== null<!>) is Boolean<!>) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableStringIndirect")!>x<!>
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!><!USELESS_IS_CHECK!>(x == null) !is Boolean<!> === false<!>) "1"
|
||||
else if (<!USELESS_IS_CHECK!>(<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>y === null !== null<!>) is Boolean<!>) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableStringIndirect")!>x<!>
|
||||
else if (<!SENSELESS_COMPARISON!>y === null != null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableStringIndirect")!>x<!>.equals(null)
|
||||
else if (<!SENSELESS_COMPARISON!>y === null != null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableStringIndirect")!>x<!>.propT
|
||||
else if (<!SENSELESS_COMPARISON!>y === null != null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableStringIndirect")!>x<!><!UNSAFE_CALL!>.<!>propAny
|
||||
@@ -181,7 +181,7 @@ fun case_12(x: TypealiasNullableStringIndirect, y: TypealiasNullableStringIndire
|
||||
|
||||
// TESTCASE NUMBER: 13
|
||||
fun case_13(x: <!UNRESOLVED_REFERENCE!>otherpackage.Case13<!>?) =
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean")!>if ((x == null !is Boolean) !== true) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean")!>if (<!DEPRECATED_IDENTITY_EQUALS!>(x == null !is Boolean) !== true<!>) {
|
||||
throw Exception()
|
||||
} else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ERROR CLASS: Symbol not found for otherpackage.Case13? & kotlin.Boolean")!>x<!>
|
||||
@@ -204,18 +204,18 @@ fun case_14() {
|
||||
if (a.x != null == true) {
|
||||
if (<!SENSELESS_COMPARISON!>a.x !== null<!> == false) {
|
||||
if (<!SENSELESS_COMPARISON!><!SENSELESS_COMPARISON!>a.x != null<!> == null<!>) {
|
||||
if (<!SENSELESS_COMPARISON!><!SENSELESS_COMPARISON!>a.x != null<!> !== null<!>) {
|
||||
if (<!SENSELESS_COMPARISON!>a.x != null<!> === true) {
|
||||
if (<!SENSELESS_COMPARISON!>a.x !== null<!> === <!USELESS_IS_CHECK!>true !is Boolean<!> == true) {
|
||||
if (<!SENSELESS_COMPARISON!>a.x != null<!> !== false) {
|
||||
if (<!SENSELESS_COMPARISON!>a.x != null<!> === false) {
|
||||
if (<!SENSELESS_COMPARISON!>a.x !== null<!> === true) {
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!><!SENSELESS_COMPARISON!>a.x != null<!> !== null<!>) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!><!SENSELESS_COMPARISON!>a.x != null<!> === true<!>) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!><!SENSELESS_COMPARISON!>a.x !== null<!> === <!USELESS_IS_CHECK!>true !is Boolean<!><!> == true) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!><!SENSELESS_COMPARISON!>a.x != null<!> !== false<!>) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!><!SENSELESS_COMPARISON!>a.x != null<!> === false<!>) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!><!SENSELESS_COMPARISON!>a.x !== null<!> === true<!>) {
|
||||
if (<!USELESS_IS_CHECK!>(<!SENSELESS_COMPARISON!>a.x != null<!> != true) !is Boolean<!>) {
|
||||
if (a.x != null is Boolean) {
|
||||
if (a.x != <!USELESS_IS_CHECK!>null is Boolean is Boolean<!>) {
|
||||
if (a.x !== null is Boolean) {
|
||||
if (<!IMPLICIT_BOXING_IN_IDENTITY_EQUALS!>a.x !== null is Boolean<!>) {
|
||||
if (a.x != null is Boolean) {
|
||||
if ((a.x !== null !is Boolean) == false) {
|
||||
if ((<!IMPLICIT_BOXING_IN_IDENTITY_EQUALS!>a.x !== null !is Boolean<!>) == false) {
|
||||
a.x
|
||||
a.x.equals(a.x)
|
||||
}
|
||||
@@ -238,7 +238,7 @@ fun case_14() {
|
||||
|
||||
// TESTCASE NUMBER: 15
|
||||
fun case_15(x: EmptyObject) {
|
||||
val t = if (<!EQUALITY_NOT_APPLICABLE!>x === <!USELESS_IS_CHECK!><!USELESS_IS_CHECK!>null is Boolean is Boolean<!> is Boolean<!><!>) "" else {
|
||||
val t = if (<!FORBIDDEN_IDENTITY_EQUALS!>x === <!USELESS_IS_CHECK!><!USELESS_IS_CHECK!>null is Boolean is Boolean<!> is Boolean<!><!>) "" else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("EmptyObject")!>x<!>.propT
|
||||
@@ -256,7 +256,7 @@ fun case_15(x: EmptyObject) {
|
||||
fun case_16() {
|
||||
val x: TypealiasNullableNothing = null
|
||||
|
||||
if (<!EQUALITY_NOT_APPLICABLE!>x != <!USELESS_IS_CHECK!><!USELESS_IS_CHECK!><!USELESS_IS_CHECK!><!USELESS_IS_CHECK!>null !is Boolean !is Boolean<!> !is Boolean<!> !is Boolean<!> !is Boolean<!><!>) {
|
||||
if (<!SENSELESS_COMPARISON!>x != <!USELESS_IS_CHECK!><!USELESS_IS_CHECK!><!USELESS_IS_CHECK!><!USELESS_IS_CHECK!>null !is Boolean !is Boolean<!> !is Boolean<!> !is Boolean<!> !is Boolean<!><!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableNothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableNothing")!>x<!><!UNSAFE_CALL!>.<!>java
|
||||
}
|
||||
@@ -270,7 +270,7 @@ val case_17 = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>if (nullableIntPrope
|
||||
|
||||
//TESTCASE NUMBER: 18
|
||||
fun case_18(a: DeepObject.A.B.C.D.E.F.G.J?) {
|
||||
if (<!SENSELESS_COMPARISON!>a != null !== null<!>) {
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>a != null !== null<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!><!UNSAFE_CALL!>.<!>equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propT
|
||||
@@ -304,7 +304,7 @@ fun case_19(b: Boolean) {
|
||||
}
|
||||
} else null
|
||||
|
||||
if (<!EQUALITY_NOT_APPLICABLE!>a != null !is Boolean<!> && <!EQUALITY_NOT_APPLICABLE!>a<!UNSAFE_CALL!>.<!>B19 != null is Boolean<!> && <!EQUALITY_NOT_APPLICABLE!>a<!UNSAFE_CALL!>.<!>B19<!UNSAFE_CALL!>.<!>C19 != null is Boolean<!> && <!SENSELESS_COMPARISON!>a<!UNSAFE_CALL!>.<!>B19<!UNSAFE_CALL!>.<!>C19<!UNSAFE_CALL!>.<!>D19 != null == null<!> && <!SENSELESS_COMPARISON!>a<!UNSAFE_CALL!>.<!>B19<!UNSAFE_CALL!>.<!>C19<!UNSAFE_CALL!>.<!>D19<!UNSAFE_CALL!>.<!>x != null !== null<!>) {
|
||||
if (<!EQUALITY_NOT_APPLICABLE!>a != null !is Boolean<!> && <!EQUALITY_NOT_APPLICABLE!>a<!UNSAFE_CALL!>.<!>B19 != null is Boolean<!> && <!EQUALITY_NOT_APPLICABLE!>a<!UNSAFE_CALL!>.<!>B19<!UNSAFE_CALL!>.<!>C19 != null is Boolean<!> && <!SENSELESS_COMPARISON!>a<!UNSAFE_CALL!>.<!>B19<!UNSAFE_CALL!>.<!>C19<!UNSAFE_CALL!>.<!>D19 != null == null<!> && <!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>a<!UNSAFE_CALL!>.<!>B19<!UNSAFE_CALL!>.<!>C19<!UNSAFE_CALL!>.<!>D19<!UNSAFE_CALL!>.<!>x != null !== null<!>) {
|
||||
a<!UNSAFE_CALL!>.<!>B19<!UNSAFE_CALL!>.<!>C19<!UNSAFE_CALL!>.<!>D19<!UNSAFE_CALL!>.<!>x
|
||||
a<!UNSAFE_CALL!>.<!>B19<!UNSAFE_CALL!>.<!>C19<!UNSAFE_CALL!>.<!>D19<!UNSAFE_CALL!>.<!>x<!UNSAFE_CALL!>.<!>equals(null)
|
||||
a<!UNSAFE_CALL!>.<!>B19<!UNSAFE_CALL!>.<!>C19<!UNSAFE_CALL!>.<!>D19<!UNSAFE_CALL!>.<!>x.propT
|
||||
@@ -330,7 +330,7 @@ fun case_20(b: Boolean) {
|
||||
}
|
||||
}
|
||||
|
||||
if (<!EQUALITY_NOT_APPLICABLE!>a.B19.C19.D19 !== null !is Boolean<!>) {
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS!>a.B19.C19.D19 !== null !is Boolean<!>) {
|
||||
a.B19.C19.D19
|
||||
a.B19.C19.D19<!UNSAFE_CALL!>.<!>equals(null)
|
||||
a.B19.C19.D19.propT
|
||||
@@ -346,7 +346,7 @@ fun case_20(b: Boolean) {
|
||||
|
||||
// TESTCASE NUMBER: 21
|
||||
fun case_21() {
|
||||
if (<!EQUALITY_NOT_APPLICABLE_WARNING!>EnumClassWithNullableProperty.B.prop_1 !== null is Boolean<!> == <!USELESS_IS_CHECK!>true !is Boolean<!> != true) {
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS!>EnumClassWithNullableProperty.B.prop_1 !== null is Boolean<!> == <!USELESS_IS_CHECK!>true !is Boolean<!> != true) {
|
||||
EnumClassWithNullableProperty.B.prop_1
|
||||
EnumClassWithNullableProperty.B.prop_1<!UNSAFE_CALL!>.<!>equals(null)
|
||||
EnumClassWithNullableProperty.B.prop_1.propT
|
||||
@@ -378,7 +378,7 @@ fun case_22(a: (() -> Unit)?) {
|
||||
|
||||
// TESTCASE NUMBER: 23
|
||||
fun case_23(a: ((Float) -> Int?)?, b: Float?) {
|
||||
if (<!EQUALITY_NOT_APPLICABLE!>a != null !is Boolean<!> && <!EQUALITY_NOT_APPLICABLE_WARNING!>b !== null is Boolean<!>) {
|
||||
if (<!EQUALITY_NOT_APPLICABLE!>a != null !is Boolean<!> && <!FORBIDDEN_IDENTITY_EQUALS!>b !== null is Boolean<!>) {
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!><!UNSAFE_IMPLICIT_INVOKE_CALL!>a<!>(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float?")!>b<!>)<!>
|
||||
if (x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>x<!>
|
||||
@@ -397,7 +397,7 @@ fun case_23(a: ((Float) -> Int?)?, b: Float?) {
|
||||
|
||||
// TESTCASE NUMBER: 24
|
||||
fun case_24(a: ((() -> Unit) -> Unit)?, b: (() -> Unit)?) =
|
||||
if (<!EQUALITY_NOT_APPLICABLE!>a !== null is Boolean<!> && <!EQUALITY_NOT_APPLICABLE!>b !== null !is Boolean<!>) {
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS!>a !== null is Boolean<!> && <!FORBIDDEN_IDENTITY_EQUALS!>b !== null !is Boolean<!>) {
|
||||
<!UNSAFE_IMPLICIT_INVOKE_CALL!>a<!>(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!>)
|
||||
<!UNSAFE_IMPLICIT_INVOKE_CALL!>a<!>(b)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Function0<kotlin.Unit>?")!>b<!><!UNSAFE_CALL!>.<!>equals(null)
|
||||
@@ -421,10 +421,10 @@ fun case_25(b: Boolean) {
|
||||
|
||||
val y = if (b) x else null
|
||||
|
||||
if (y !== null === true) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>y !== null === true<!>) {
|
||||
val z = <!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>?")!>y()<!>
|
||||
|
||||
if (z != null !== false) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>z != null !== false<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>? & <anonymous>")!>z<!>.a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>? & <anonymous>")!>z<!>.a.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>? & <anonymous>")!>z<!>.a.propT
|
||||
@@ -443,7 +443,7 @@ fun case_25(b: Boolean) {
|
||||
fun case_26(a: ((Float) -> Int?)?, b: Float?) {
|
||||
if (a != null == true == false && b != null == true == false) {
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!><!UNSAFE_IMPLICIT_INVOKE_CALL!>a<!>(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float? & kotlin.Nothing?")!>b<!>)<!>
|
||||
if (x != null == true === false) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>x != null == true === false<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing?")!>x<!>.propT
|
||||
|
||||
@@ -322,7 +322,7 @@ fun case_15(x: EmptyObject) {
|
||||
fun case_16() {
|
||||
val x: TypealiasNullableNothing = null
|
||||
|
||||
if (x != null) {
|
||||
if (<!SENSELESS_COMPARISON!>x != null<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableNothing & kotlin.Nothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ fun case_1(x: Any?) {
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_2(x: Any) {
|
||||
if (x is Int === true) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>x is Int === true<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Int")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Int")!>x<!>.inv()
|
||||
}
|
||||
@@ -60,7 +60,7 @@ fun case_6(x: Any?) {
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_7(x: Any) {
|
||||
if (!(x is DeepObject.A.B.C.D.E.F.G.J) !== false) else {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>!(x is DeepObject.A.B.C.D.E.F.G.J) !== false<!>) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & DeepObject.A.B.C.D.E.F.G.J")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & DeepObject.A.B.C.D.E.F.G.J")!>x<!>.prop_1
|
||||
}
|
||||
@@ -72,7 +72,7 @@ fun case_7(x: Any) {
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_8(x: Any?) {
|
||||
if (!(x is Int?) !== false !== false !== false) else {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!><!DEPRECATED_IDENTITY_EQUALS!><!DEPRECATED_IDENTITY_EQUALS!>!(x is Int?) !== false<!> !== false<!> !== false<!>) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int?")!>x<!>?.inv()
|
||||
}
|
||||
@@ -84,7 +84,7 @@ fun case_8(x: Any?) {
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_9(x: Any?) {
|
||||
if (!!(x !is TypealiasNullableStringIndirect<!REDUNDANT_NULLABLE!>?<!>) !== false === true) else {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!><!DEPRECATED_IDENTITY_EQUALS!>!!(x !is TypealiasNullableStringIndirect<!REDUNDANT_NULLABLE!>?<!>) !== false<!> === true<!>) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & TypealiasNullableStringIndirect?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & TypealiasNullableStringIndirect?")!>x<!>?.get(0)
|
||||
}
|
||||
@@ -96,7 +96,7 @@ fun case_9(x: Any?) {
|
||||
* ISSUES: KT-28329
|
||||
*/
|
||||
fun case_10(x: Any?) {
|
||||
if (!!(x !is Interface3) === true && true) else {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>!!(x !is Interface3) === true<!> && true) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!UNRESOLVED_REFERENCE!>itest<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>.<!UNRESOLVED_REFERENCE!>itest3<!>()
|
||||
|
||||
@@ -161,7 +161,7 @@ inline fun <reified T>case_17(x: Any?) {
|
||||
* ISSUES: KT-30369, KT-28262, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_18(x: Any?) {
|
||||
if (x?.equals(10) === null === true) else {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>x?.equals(10) === null === true<!>) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>.equals(10)
|
||||
}
|
||||
@@ -173,7 +173,7 @@ inline fun <reified T>case_18(x: Any?) {
|
||||
* ISSUES: KT-30369, KT-28262, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_19(x: Any?) {
|
||||
if (x?.equals(10) !== null === true) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>x?.equals(10) !== null === true<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>.equals(10)
|
||||
}
|
||||
@@ -185,7 +185,7 @@ inline fun <reified T>case_19(x: Any?) {
|
||||
* ISSUES: KT-30369, KT-28262, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_20(x: Any?) {
|
||||
if (x?.equals(10) === null !== false) else {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>x?.equals(10) === null !== false<!>) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>.equals(10)
|
||||
}
|
||||
@@ -197,7 +197,7 @@ inline fun <reified T>case_20(x: Any?) {
|
||||
* ISSUES: KT-30369, KT-28262, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_21(x: Any?) {
|
||||
if (x?.equals(10) !== null !== false) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>x?.equals(10) !== null !== false<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>.equals(10)
|
||||
}
|
||||
@@ -209,7 +209,7 @@ inline fun <reified T>case_21(x: Any?) {
|
||||
* ISSUES: KT-30369, KT-28262, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_22(x: Any?) {
|
||||
if (x?.equals(10) !== null !== true) else {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>x?.equals(10) !== null !== true<!>) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>.equals(10)
|
||||
}
|
||||
@@ -221,7 +221,7 @@ inline fun <reified T>case_22(x: Any?) {
|
||||
* ISSUES: KT-30369, KT-28262, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_23(x: Any?) {
|
||||
if (x?.equals(10) === null === false) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>x?.equals(10) === null === false<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>.equals(10)
|
||||
}
|
||||
@@ -257,7 +257,7 @@ inline fun <reified T>case_25(x: Any?) {
|
||||
* ISSUES: KT-30369, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_26(x: Any?) {
|
||||
if (x?.equals(10) != null === false) else {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>x?.equals(10) != null === false<!>) else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>.equals(10)
|
||||
}
|
||||
@@ -269,7 +269,7 @@ inline fun <reified T>case_26(x: Any?) {
|
||||
* ISSUES: KT-30369, KT-29878
|
||||
*/
|
||||
inline fun <reified T>case_27(x: Any?) {
|
||||
if (x?.equals(10) == null === false) {
|
||||
if (<!DEPRECATED_IDENTITY_EQUALS!>x?.equals(10) == null === false<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>.equals(10)
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ fun case_15(x: TypealiasNullableString) {
|
||||
fun case_16() {
|
||||
val x: TypealiasNullableNothing = null
|
||||
|
||||
if (x == null || false || false || false) {
|
||||
if (<!SENSELESS_COMPARISON!>x == null<!> || false || false || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableNothing")!>x<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ fun case_10(x: Any?, z: Any, b: Boolean?) {
|
||||
false -> return
|
||||
null -> throw Exception()
|
||||
}
|
||||
z === y || if (b == true) return else if (b === false) null!! else throw Exception()
|
||||
z === y || if (b == true) return else if (<!IMPLICIT_BOXING_IN_IDENTITY_EQUALS!>b === false<!>) null!! else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
@@ -137,7 +137,7 @@ fun case_10(x: Any?, z: Any, b: Boolean?) {
|
||||
fun case_11(x: Any?, z: Any, b: Boolean?) {
|
||||
while (true) {
|
||||
var y = x ?: if (b == true) continue<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!> else if (!(b != false)) return else break <!USELESS_ELVIS!>?: break::class<!>
|
||||
z !== y && if (b == true) return else if (b === false) null!!else throw Exception()
|
||||
z !== y && if (b == true) return else if (<!IMPLICIT_BOXING_IN_IDENTITY_EQUALS!>b === false<!>) null!!else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Any")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
@@ -148,7 +148,7 @@ fun case_11(x: Any?, z: Any, b: Boolean?) {
|
||||
fun case_12(x: Any?, z: Any, b: Boolean?) {
|
||||
while (true) {
|
||||
var y = select(x) ?: if (b == true) continue<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!> else if (!(b != false)) return else break <!USELESS_ELVIS!>?: break::class<!>
|
||||
select(z) !== y && if (b == true) return else if (b === false) null!!else throw Exception()
|
||||
select(z) !== y && if (b == true) return else if (<!IMPLICIT_BOXING_IN_IDENTITY_EQUALS!>b === false<!>) null!!else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
|
||||
@@ -77,7 +77,7 @@ fun case_6(x: Boolean?) {
|
||||
// TESTCASE NUMBER: 7
|
||||
fun case_7(x: Boolean?) {
|
||||
while (true) {
|
||||
if (!(x === false)) return
|
||||
if (!(<!IMPLICIT_BOXING_IN_IDENTITY_EQUALS!>x === false<!>)) return
|
||||
}
|
||||
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Boolean?")!>x<!>
|
||||
|
||||
@@ -257,7 +257,7 @@ fun case_22(a: (() -> Unit)) {
|
||||
fun case_23(a: ((Float) -> Int), b: Float) {
|
||||
if (<!SENSELESS_COMPARISON!>a == null<!> && <!SENSELESS_COMPARISON!>b == null<!>) {
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float & kotlin.Nothing")!>b<!>)<!>
|
||||
if (<!SENSELESS_COMPARISON!>x !== null<!>) {
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>x !== null<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>x<!>
|
||||
}
|
||||
}
|
||||
@@ -282,7 +282,7 @@ fun case_25(a: (() -> Unit) -> Unit, b: (() -> Unit) -> Unit = if (<!SENSELESS_C
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 26
|
||||
fun case_26(a: Int, b: Int = if (<!SENSELESS_COMPARISON!>a === null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Nothing")!>a<!> else 0) {
|
||||
fun case_26(a: Int, b: Int = if (<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>a === null<!>) <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Nothing")!>a<!> else 0) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ fun case_1(x: Any?, y: Any?) {
|
||||
* ISSUES: KT-30317
|
||||
*/
|
||||
fun case_2(x: Any?, y: Any?) {
|
||||
if (x as Int === y) {
|
||||
if (<!IMPLICIT_BOXING_IN_IDENTITY_EQUALS!>x as Int === y<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int")!>x<!>.inv(<!TOO_MANY_ARGUMENTS!>10<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int")!>y<!>
|
||||
@@ -49,7 +49,7 @@ fun case_3(x: Any?, y: Any?) {
|
||||
* ISSUES: KT-30317
|
||||
*/
|
||||
fun case_4(x: Any?, y: Any?) {
|
||||
if (y === x as Int) {
|
||||
if (<!IMPLICIT_BOXING_IN_IDENTITY_EQUALS!>y === x as Int<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int")!>x<!>.inv(<!TOO_MANY_ARGUMENTS!>10<!>)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int")!>y<!>
|
||||
|
||||
@@ -26,7 +26,7 @@ fun case_2() {
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
x = x<!UNSAFE_CALL!>.<!>equals(10)
|
||||
} while (<!SENSELESS_COMPARISON!>x !== null<!>)
|
||||
} while (<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>x !== null<!>)
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
@@ -58,7 +58,7 @@ fun case_5() {
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
x = x<!UNSAFE_CALL!>.<!>equals(10)
|
||||
} while (<!SENSELESS_COMPARISON!>x !== null<!>)
|
||||
} while (<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>x !== null<!>)
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -86,7 +86,7 @@ fun case_7() {
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
x = x<!UNSAFE_CALL!>.<!>equals(10)
|
||||
} while (<!SENSELESS_COMPARISON!>x !== null<!>)
|
||||
} while (<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>x !== null<!>)
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -114,7 +114,7 @@ fun case_9() {
|
||||
do {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
x = x<!UNSAFE_CALL!>.<!>equals(10)
|
||||
} while (<!SENSELESS_COMPARISON!>x !== null<!>)
|
||||
} while (<!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>x !== null<!>)
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -300,7 +300,7 @@ fun case_16() {
|
||||
val x: TypealiasNullableNothing = null
|
||||
val y: Nothing? = null
|
||||
|
||||
if (x !== y) {
|
||||
if (<!SENSELESS_COMPARISON!>x !== y<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableNothing & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableNothing & kotlin.Nothing")!>x<!>.hashCode()
|
||||
}
|
||||
@@ -437,7 +437,7 @@ fun case_22(a: (() -> Unit)?) {
|
||||
|
||||
// TESTCASE NUMBER: 23
|
||||
fun case_23(a: ((Float) -> Int?)?, b: Float?, z: Nothing?) {
|
||||
if (a != z && b !== z && <!SENSELESS_COMPARISON!>b !== z<!>) {
|
||||
if (a != z && b !== z && <!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>b !== z<!>) {
|
||||
val x = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>a(<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Float? & kotlin.Float")!>b<!>)<!>
|
||||
if (x != z || <!SENSELESS_COMPARISON!>x !== implicitNullableNothingProperty<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!>
|
||||
@@ -577,7 +577,7 @@ fun case_29(x: Boolean) {
|
||||
if (false || false || false || false || y !== v) {
|
||||
val t = <!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>?")!><!UNSAFE_IMPLICIT_INVOKE_CALL!>y<!>()<!>
|
||||
|
||||
if (<!EQUALITY_NOT_APPLICABLE_WARNING!>z !== t<!> || false) {
|
||||
if (z !== t || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>?")!>t<!><!UNSAFE_CALL!>.<!>a
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>?")!>t<!><!UNSAFE_CALL!>.<!>equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("<anonymous>?")!>t<!>.propT
|
||||
@@ -677,7 +677,7 @@ fun case_33(a: ((Float) -> Int?)?, b: Float?, c: Boolean?) {
|
||||
fun case_34(z1: Boolean?) {
|
||||
var z = null
|
||||
|
||||
if (true && true && true && true && EnumClassWithNullableProperty.A.prop_1 != implicitNullableNothingProperty && <!SENSELESS_COMPARISON!>EnumClassWithNullableProperty.A.prop_1 !== null<!> && <!SENSELESS_COMPARISON!>EnumClassWithNullableProperty.A.prop_1 !== z<!> || z1 != implicitNullableNothingProperty || z1!! && true && true) {
|
||||
if (true && true && true && true && EnumClassWithNullableProperty.A.prop_1 != implicitNullableNothingProperty && <!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>EnumClassWithNullableProperty.A.prop_1 !== null<!> && <!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>EnumClassWithNullableProperty.A.prop_1 !== z<!> || z1 != implicitNullableNothingProperty || z1!! && true && true) {
|
||||
|
||||
} else {
|
||||
EnumClassWithNullableProperty.A.prop_1
|
||||
@@ -910,7 +910,7 @@ fun case_51() {
|
||||
val x: TypealiasNullableNothing = null
|
||||
val z: Nothing? = null
|
||||
|
||||
if (x === z || <!SENSELESS_COMPARISON!>z == x<!> && <!SENSELESS_COMPARISON!>x == z<!> || false || false || false) {
|
||||
if (<!SENSELESS_COMPARISON!>x === z<!> || <!SENSELESS_COMPARISON!>z == x<!> && <!SENSELESS_COMPARISON!>x == z<!> || false || false || false) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableNothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNullableNothing")!>x<!>.hashCode()
|
||||
}
|
||||
@@ -1401,7 +1401,7 @@ fun case_75(t: Any?, z: Nothing?) {
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 76
|
||||
fun case_76(a: Any?, b: Int = if (a !is Number? === true || a !is Int? == true || a != null == false == true) 0 else <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int")!>a<!>) {
|
||||
fun case_76(a: Any?, b: Int = if (<!DEPRECATED_IDENTITY_EQUALS!>a !is Number? === true<!> || a !is Int? == true || a != null == false == true) 0 else <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any? & kotlin.Int")!>a<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>b<!>.equals(null)
|
||||
|
||||
@@ -168,7 +168,7 @@ fun case_9(x: TypealiasNullableString<!REDUNDANT_NULLABLE!>?<!>) {
|
||||
fun case_10() {
|
||||
val a = Class()
|
||||
|
||||
if (a.prop_4 === null || <!SENSELESS_COMPARISON!>a.prop_4 === null<!> || true) {
|
||||
if (a.prop_4 === null || <!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>a.prop_4 === null<!> || true) {
|
||||
if (a.prop_4 != null) {
|
||||
a.prop_4
|
||||
a.prop_4.equals(null)
|
||||
@@ -283,14 +283,14 @@ fun case_16() {
|
||||
val x: TypealiasNothing? = null
|
||||
val y: Nothing? = null
|
||||
|
||||
if (x != null || x !== null || x != y) {
|
||||
if (<!SENSELESS_COMPARISON!>x != null<!> || <!SENSELESS_COMPARISON!>x !== null<!> || <!SENSELESS_COMPARISON!>x != y<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNothing? & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("TypealiasNothing? & kotlin.Nothing")!>x<!>.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
// TESTCASE NUMBER: 17
|
||||
val case_17 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>if (nullableIntProperty == null || <!SENSELESS_COMPARISON!>nullableNothingProperty === nullableIntProperty<!>) 0 else {
|
||||
val case_17 = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>if (nullableIntProperty == null || <!FORBIDDEN_IDENTITY_EQUALS_WARNING, SENSELESS_COMPARISON!>nullableNothingProperty === nullableIntProperty<!>) 0 else {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>nullableIntProperty<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>nullableIntProperty<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Int")!>nullableIntProperty<!>.propAny
|
||||
|
||||
Reference in New Issue
Block a user