[NI] Consider intersection type with number type as Nothing

Currently, only for "in": In<in Int & A> == In<in Nothing> == In<*>

 #KT-37302 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-03-22 23:25:12 +03:00
parent b23aff4d0d
commit 191fb02bf6
26 changed files with 242 additions and 92 deletions
@@ -18,16 +18,16 @@ fun case_1() {
val x = case_1(Out(10), Inv(0.1))
if (x != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?"), DEBUG_INFO_SMARTCAST!>x<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?"), DEBUG_INFO_SMARTCAST!>x<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?"), DEBUG_INFO_SMARTCAST!>x<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?")!>x<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?")!>x<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?"), DEBUG_INFO_SMARTCAST!>x<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?"), DEBUG_INFO_SMARTCAST!>x<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?")!>x<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?")!>x<!>.funNullableAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.funNullableAny()
}
}
@@ -38,16 +38,16 @@ fun case_2(y: Int) {
val x = case_2(Out(y), Inv(0.1))
if (x != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?"), DEBUG_INFO_SMARTCAST!>x<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?"), DEBUG_INFO_SMARTCAST!>x<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?"), DEBUG_INFO_SMARTCAST!>x<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?")!>x<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?")!>x<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?"), DEBUG_INFO_SMARTCAST!>x<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?"), DEBUG_INFO_SMARTCAST!>x<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?")!>x<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Int}> & Number} & {Comparable<{Double & Int}> & Number}?")!>x<!>.funNullableAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number} & {Comparable<*> & Number}?")!>x<!>.funNullableAny()
}
}
@@ -61,32 +61,32 @@ fun case_3(a: Int?, b: Float?, c: Double?, d: Boolean?) {
false -> b
null -> c
}.apply {
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}")!>this<!>
if (this != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>this<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>this<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>this<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>this<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>this<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>this<!>.funNullableAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}"), DEBUG_INFO_SMARTCAST!>this<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}"), DEBUG_INFO_SMARTCAST!>this<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}"), DEBUG_INFO_SMARTCAST!>this<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}")!>this<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}")!>this<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}"), DEBUG_INFO_SMARTCAST!>this<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}"), DEBUG_INFO_SMARTCAST!>this<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}")!>this<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}"), DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}")!>this<!>.funNullableAny()
}
}.let {
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}>? & Number?}")!>it<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing>? & Number?}")!>it<!>
if (it != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}")!>it<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>it<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>it<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>it<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}")!>it<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}")!>it<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>it<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}"), DEBUG_INFO_SMARTCAST!>it<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}")!>it<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Double & Float & Int}> & Number} & {Comparable<{Double & Float & Int}>? & Number?}")!>it<!>.funNullableAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}")!>it<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}"), DEBUG_INFO_SMARTCAST!>it<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}"), DEBUG_INFO_SMARTCAST!>it<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}"), DEBUG_INFO_SMARTCAST!>it<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}")!>it<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}")!>it<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}"), DEBUG_INFO_SMARTCAST!>it<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}"), DEBUG_INFO_SMARTCAST!>it<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}")!>it<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<Nothing> & Number} & {Comparable<Nothing>? & Number?}")!>it<!>.funNullableAny()
}
}
}
@@ -100,9 +100,9 @@ fun case_6() {
val x = select(Case6_1<Int>(), Case6_2<Float>(), null)
if (x != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<{Float & Int}> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<Nothing> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out Any?> & InterfaceWithTypeParameter2<out Any?>}>>}>>} & {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<{Float & Int}> & Number}>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<Nothing> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out Any?> & InterfaceWithTypeParameter2<out Any?>}>>}>>?}")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<{Float & Int}> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<Nothing> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out Any?> & InterfaceWithTypeParameter2<out Any?>}>>}>>} & {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<{Float & Int}> & Number}>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<Nothing> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out Any?> & InterfaceWithTypeParameter2<out Any?>}>>}>>?}")!>x<!>.ip1test1()
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<{Float & Int}> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<Nothing> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out Any?> & InterfaceWithTypeParameter2<out Any?>}>>}>>} & {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<{Float & Int}> & Number}>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<Nothing> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out Any?> & InterfaceWithTypeParameter2<out Any?>}>>}>>?}")!>x<!>.ip1test2()
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out Any?> & InterfaceWithTypeParameter2<out Any?>}>>}>>} & {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out Any?> & InterfaceWithTypeParameter2<out Any?>}>>}>>?}")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out Any?> & InterfaceWithTypeParameter2<out Any?>}>>}>>} & {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out Any?> & InterfaceWithTypeParameter2<out Any?>}>>}>>?}")!>x<!>.ip1test1()
<!DEBUG_INFO_EXPRESSION_TYPE("{InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out Any?> & InterfaceWithTypeParameter2<out Any?>}>>}>>} & {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>>? & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out InterfaceWithTypeParameter2<out {Comparable<*> & Number}>> & InterfaceWithTypeParameter2<out InterfaceWithTypeParameter2<out {InterfaceWithTypeParameter1<out Any?> & InterfaceWithTypeParameter2<out Any?>}>>}>>?}")!>x<!>.ip1test2()
}
}
@@ -114,8 +114,8 @@ fun case_7() {
val x = select(Case7_1<Int, Float>(), Case7_2<Char, String>(), null)
if (x != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<out Inv<out {Comparable<{Int & String}> & java.io.Serializable}>, out Inv<out {Comparable<{Char & Float}> & java.io.Serializable}>> & InterfaceWithTwoTypeParameters<out Inv<out {Comparable<{Int & String}> & java.io.Serializable}>, out Inv<out {Comparable<{Char & Float}> & java.io.Serializable}>>?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<out Inv<out {Comparable<{Int & String}> & java.io.Serializable}>, out Inv<out {Comparable<{Char & Float}> & java.io.Serializable}>> & InterfaceWithTwoTypeParameters<out Inv<out {Comparable<{Int & String}> & java.io.Serializable}>, out Inv<out {Comparable<{Char & Float}> & java.io.Serializable}>>?")!>x<!>.ip2test()
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<out Inv<out {Comparable<*> & java.io.Serializable}>, out Inv<out {Comparable<*> & java.io.Serializable}>> & InterfaceWithTwoTypeParameters<out Inv<out {Comparable<*> & java.io.Serializable}>, out Inv<out {Comparable<*> & java.io.Serializable}>>?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithTwoTypeParameters<out Inv<out {Comparable<*> & java.io.Serializable}>, out Inv<out {Comparable<*> & java.io.Serializable}>> & InterfaceWithTwoTypeParameters<out Inv<out {Comparable<*> & java.io.Serializable}>, out Inv<out {Comparable<*> & java.io.Serializable}>>?")!>x<!>.ip2test()
}
}
@@ -127,24 +127,24 @@ fun case_8() {
val x = select(Case8_1<Int, Float>(), Case8_2<Char, String>(), null)
if (x != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out {Comparable<{Int & String}> & java.io.Serializable}, out {Comparable<{Char & Float}> & java.io.Serializable}>, out {Comparable<{Char & Float}> & java.io.Serializable}> & ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out {Comparable<{Int & String}> & java.io.Serializable}, out {Comparable<{Char & Float}> & java.io.Serializable}>, out {Comparable<{Char & Float}> & java.io.Serializable}>?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out {Comparable<{Int & String}> & java.io.Serializable}, out {Comparable<{Char & Float}> & java.io.Serializable}>, out {Comparable<{Char & Float}> & java.io.Serializable}> & ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out {Comparable<{Int & String}> & java.io.Serializable}, out {Comparable<{Char & Float}> & java.io.Serializable}>, out {Comparable<{Char & Float}> & java.io.Serializable}>?")!>x<!>.test1()
val y = <!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out {Comparable<{Int & String}> & java.io.Serializable}, out {Comparable<{Char & Float}> & java.io.Serializable}>, out {Comparable<{Char & Float}> & java.io.Serializable}> & ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out {Comparable<{Int & String}> & java.io.Serializable}, out {Comparable<{Char & Float}> & java.io.Serializable}>, out {Comparable<{Char & Float}> & java.io.Serializable}>?")!>x<!>.test2()
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out {Comparable<*> & java.io.Serializable}, out {Comparable<*> & java.io.Serializable}>, out {Comparable<*> & java.io.Serializable}> & ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out {Comparable<*> & java.io.Serializable}, out {Comparable<*> & java.io.Serializable}>, out {Comparable<*> & java.io.Serializable}>?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out {Comparable<*> & java.io.Serializable}, out {Comparable<*> & java.io.Serializable}>, out {Comparable<*> & java.io.Serializable}> & ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out {Comparable<*> & java.io.Serializable}, out {Comparable<*> & java.io.Serializable}>, out {Comparable<*> & java.io.Serializable}>?")!>x<!>.test1()
val y = <!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out {Comparable<*> & java.io.Serializable}, out {Comparable<*> & java.io.Serializable}>, out {Comparable<*> & java.io.Serializable}> & ClassWithTwoTypeParameters<out ClassWithTwoTypeParameters<out {Comparable<*> & java.io.Serializable}, out {Comparable<*> & java.io.Serializable}>, out {Comparable<*> & java.io.Serializable}>?")!>x<!>.test2()
if (y != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out {Comparable<{Int & String}> & java.io.Serializable}, out {Comparable<{Char & Float}> & java.io.Serializable}> & ClassWithTwoTypeParameters<out {Comparable<{Int & String}> & java.io.Serializable}, out {Comparable<{Char & Float}> & java.io.Serializable}>?")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out {Comparable<{Int & String}> & java.io.Serializable}, out {Comparable<{Char & Float}> & java.io.Serializable}> & ClassWithTwoTypeParameters<out {Comparable<{Int & String}> & java.io.Serializable}, out {Comparable<{Char & Float}> & java.io.Serializable}>?")!>y<!>.test1()
val z = <!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out {Comparable<{Int & String}> & java.io.Serializable}, out {Comparable<{Char & Float}> & java.io.Serializable}> & ClassWithTwoTypeParameters<out {Comparable<{Int & String}> & java.io.Serializable}, out {Comparable<{Char & Float}> & java.io.Serializable}>?")!>y<!>.test2()
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out {Comparable<*> & java.io.Serializable}, out {Comparable<*> & java.io.Serializable}> & ClassWithTwoTypeParameters<out {Comparable<*> & java.io.Serializable}, out {Comparable<*> & java.io.Serializable}>?")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out {Comparable<*> & java.io.Serializable}, out {Comparable<*> & java.io.Serializable}> & ClassWithTwoTypeParameters<out {Comparable<*> & java.io.Serializable}, out {Comparable<*> & java.io.Serializable}>?")!>y<!>.test1()
val z = <!DEBUG_INFO_EXPRESSION_TYPE("ClassWithTwoTypeParameters<out {Comparable<*> & java.io.Serializable}, out {Comparable<*> & java.io.Serializable}> & ClassWithTwoTypeParameters<out {Comparable<*> & java.io.Serializable}, out {Comparable<*> & java.io.Serializable}>?")!>y<!>.test2()
if (z != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Int & String}> & java.io.Serializable} & {Comparable<{Int & String}> & java.io.Serializable}?")!>z<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Int & String}> & java.io.Serializable} & {Comparable<{Int & String}> & java.io.Serializable}?"), DEBUG_INFO_SMARTCAST!>z<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Int & String}> & java.io.Serializable} & {Comparable<{Int & String}> & java.io.Serializable}?"), DEBUG_INFO_SMARTCAST!>z<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Int & String}> & java.io.Serializable} & {Comparable<{Int & String}> & java.io.Serializable}?"), DEBUG_INFO_SMARTCAST!>z<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Int & String}> & java.io.Serializable} & {Comparable<{Int & String}> & java.io.Serializable}?")!>z<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Int & String}> & java.io.Serializable} & {Comparable<{Int & String}> & java.io.Serializable}?")!>z<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Int & String}> & java.io.Serializable} & {Comparable<{Int & String}> & java.io.Serializable}?"), DEBUG_INFO_SMARTCAST!>z<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Int & String}> & java.io.Serializable} & {Comparable<{Int & String}> & java.io.Serializable}?"), DEBUG_INFO_SMARTCAST!>z<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Int & String}> & java.io.Serializable} & {Comparable<{Int & String}> & java.io.Serializable}?")!>z<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Int & String}> & java.io.Serializable} & {Comparable<{Int & String}> & java.io.Serializable}?")!>z<!>.funNullableAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & java.io.Serializable} & {Comparable<*> & java.io.Serializable}?")!>z<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & java.io.Serializable} & {Comparable<*> & java.io.Serializable}?")!>z<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & java.io.Serializable} & {Comparable<*> & java.io.Serializable}?")!>z<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & java.io.Serializable} & {Comparable<*> & java.io.Serializable}?")!>z<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & java.io.Serializable} & {Comparable<*> & java.io.Serializable}?")!>z<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & java.io.Serializable} & {Comparable<*> & java.io.Serializable}?")!>z<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & java.io.Serializable} & {Comparable<*> & java.io.Serializable}?")!>z<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & java.io.Serializable} & {Comparable<*> & java.io.Serializable}?")!>z<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & java.io.Serializable} & {Comparable<*> & java.io.Serializable}?")!>z<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & java.io.Serializable} & {Comparable<*> & java.io.Serializable}?")!>z<!>.funNullableAny()
}
}
}
@@ -143,8 +143,8 @@ fun case_12(z: Any?) {
return@let it as Int
<!UNREACHABLE_CODE!>it as? Float ?: 10f<!>
}
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Float & Int}> & Number}")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Float & Int}> & Number}")!>y<!>.toByte()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number}")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number}")!>y<!>.toByte()
}
/*
@@ -167,8 +167,8 @@ fun case_14(z: Any?) {
return@run this as Int
<!UNREACHABLE_CODE!>this as? Float ?: 10f<!>
}
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Float & Int}> & Number}")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<{Float & Int}> & Number}")!>y<!>.toByte()
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number}")!>y<!>
<!DEBUG_INFO_EXPRESSION_TYPE("{Comparable<*> & Number}")!>y<!>.toByte()
}
/*