FIR: in case of smart cast, use original type for FirThisRcvrExpression

Before this commit, we used type after smart cast both for original
FirThisReceiverExpression and for wrapping FirExpressionWithSmartCast.
However, this makes FIR2IR implicit cast generator work incorrectly
(it decides not to insert implicit cast because original type is the same).
After this commit, expressions have different types and implicit cast
generator works properly.
This commit is contained in:
Mikhail Glukhikh
2021-01-19 18:19:45 +03:00
parent 4fd4f504d0
commit 06ee768c6a
18 changed files with 988 additions and 797 deletions
@@ -5,7 +5,7 @@
// TESTCASE NUMBER: 1
fun <T : List<T>> Inv<out T>.case_1() {
if (this is MutableList<*>) {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<*> & Inv<out T> & kotlin.collections.MutableList<*> & Inv<out T>")!>this<!>
<!INAPPLICABLE_CANDIDATE!><!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<*> & Inv<out T> & kotlin.collections.MutableList<*> & Inv<out T>")!>this<!>[0] = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<*> & Inv<out T> & kotlin.collections.MutableList<*> & Inv<out T>")!>this<!>[1]<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<*> & Inv<out T> & Inv<out T>")!>this<!>
<!INAPPLICABLE_CANDIDATE!><!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<*> & Inv<out T> & Inv<out T>")!>this<!>[0] = <!DEBUG_INFO_EXPRESSION_TYPE("kotlin.collections.MutableList<*> & Inv<out T> & Inv<out T>")!>this<!>[1]<!>
}
}
@@ -54,16 +54,16 @@ fun case_3(a: Int?, b: Float?, c: Double?, d: Boolean?) {
}.apply {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Comparable<*>?")!>this<!>
if (this != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number & kotlin.Comparable<*>")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number & kotlin.Comparable<*>")!>this<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number & kotlin.Comparable<*>")!>this<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number & kotlin.Comparable<*>")!>this<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number & kotlin.Comparable<*>")!>this<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number & kotlin.Comparable<*>")!>this<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number & kotlin.Comparable<*>")!>this<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number & kotlin.Comparable<*>")!>this<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number & kotlin.Comparable<*>")!>this<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number & kotlin.Comparable<*>")!>this<!>.funNullableAny()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number? & kotlin.Comparable<*>?")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number? & kotlin.Comparable<*>?")!>this<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number? & kotlin.Comparable<*>?")!>this<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number? & kotlin.Comparable<*>?")!>this<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number? & kotlin.Comparable<*>?")!>this<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number? & kotlin.Comparable<*>?")!>this<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number? & kotlin.Comparable<*>?")!>this<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number? & kotlin.Comparable<*>?")!>this<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number? & kotlin.Comparable<*>?")!>this<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Comparable<*> & kotlin.Number? & kotlin.Comparable<*>?")!>this<!>.funNullableAny()
}
}.let {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number? & kotlin.Comparable<*>?")!>it<!>
@@ -97,16 +97,16 @@ fun case_4(a: Interface1?, b: Interface2?, c: Boolean) {
x.apply {
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2? & Interface1?")!>this<!>
if (this != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funNullableAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funNullableAny()
}
}
x.let {
@@ -140,16 +140,16 @@ fun case_5(a: Interface1?, b: Interface2?, d: Boolean) {
x.apply {
if (this != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2 & Interface1")!>this<!>.funNullableAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funNullableAny()
}
}
x.let {
@@ -182,20 +182,20 @@ fun case_6(a: Interface1?, b: Interface2, d: Boolean) {
x.apply {
this as Interface3
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>
if (this != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funNullableAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.itest1()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.itest2()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funNullableAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.itest1()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.itest2()
}
}
x.let {
@@ -232,20 +232,20 @@ fun case_7(a: Interface1?, b: Interface2?, d: Boolean) {
x.apply {
this as Interface3?
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3? & Interface2? & Interface1? & Interface3? & Interface2? & Interface1?")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3? & Interface2? & Interface1? & Interface2? & Interface1?")!>this<!>
if (this != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.funNullableAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.itest1()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface3 & Interface2 & Interface1")!>this<!>.itest2()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.equals(null)
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propNullableT
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.propNullableAny
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funNullableT()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.funNullableAny()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.itest1()
<!DEBUG_INFO_EXPRESSION_TYPE("Interface3 & Interface2 & Interface1 & Interface2? & Interface1?")!>this<!>.itest2()
}
}
x.let {
File diff suppressed because it is too large Load Diff
@@ -14,8 +14,8 @@ fun case_1(vararg x: Int?) {
fun case_2(vararg x: Int?) {
x[0].apply {
if (this != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>this<!>.inv()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>this<!>.inv()
}
}
@@ -39,8 +39,8 @@ fun <T> case_3(vararg x: T?) {
fun <T : Number?> case_4(vararg x: T?) {
x[0].apply {
if (this != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?!!")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?!!")!>this<!>.toByte()
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("T?!! & T?")!>this<!>.toByte()
}
}
@@ -10,8 +10,8 @@
fun Int?.case_1() {
val x = this
if (x != null) {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>this<!>.inv()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>this<!>.inv()
}
}
@@ -48,6 +48,6 @@ fun Int?.case_3() {
fun Int?.case_4() {
val x = this
x!!
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int")!>this<!>.inv()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>this<!>.inv()
}
@@ -5,9 +5,9 @@
// TESTCASE NUMBER: 1
fun Any.case_1() {
if (this is Inv<*>) {
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>")!>this<!>.test()
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>")!>this<!>.prop_4
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & Inv<*>")!>this<!>.prop_4.inv()
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & kotlin.Any")!>this<!>.test()
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & kotlin.Any")!>this<!>.prop_4
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & kotlin.Any")!>this<!>.prop_4.inv()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>prop_4<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>prop_4<!>.inv()
}
@@ -16,9 +16,9 @@ fun Any.case_1() {
// TESTCASE NUMBER: 2
fun Any.case_2() {
if (this is ClassWithSixTypeParameters<*, *, *, *, *, *>) {
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>")!>this<!>.test()
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>")!>this<!>.x
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & ClassWithSixTypeParameters<*, *, *, *, *, *>")!>this<!>.y
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any")!>this<!>.test()
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any")!>this<!>.x
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & kotlin.Any")!>this<!>.y
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>y<!>
}
@@ -27,9 +27,9 @@ fun Any.case_2() {
// TESTCASE NUMBER: 3
fun <T> T.case_3() {
if (this is Inv<*>) {
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & T!! & Inv<*> & T!!")!>this<!>.test()
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & T!! & Inv<*> & T!!")!>this<!>.prop_4
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & T!! & Inv<*> & T!!")!>this<!>.prop_4.inv()
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & T!! & T")!>this<!>.test()
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & T!! & T")!>this<!>.prop_4
<!DEBUG_INFO_EXPRESSION_TYPE("Inv<*> & T!! & T")!>this<!>.prop_4.inv()
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>prop_4<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int")!>prop_4<!>.inv()
}
@@ -38,9 +38,9 @@ fun <T> T.case_3() {
// TESTCASE NUMBER: 4
fun <T> T?.case_4() {
if (this is ClassWithSixTypeParameters<*, *, *, *, *, *>) {
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!! & ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!!")!>this<!>.test()
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!! & ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!!")!>this<!>.x
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!! & ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!!")!>this<!>.y
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!! & T?")!>this<!>.test()
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!! & T?")!>this<!>.x
<!DEBUG_INFO_EXPRESSION_TYPE("ClassWithSixTypeParameters<*, *, *, *, *, *> & T?!! & T?")!>this<!>.y
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>y<!>
}
@@ -49,11 +49,11 @@ fun <T> T?.case_4() {
// TESTCASE NUMBER: 5
fun <T> ClassWithSixTypeParameters<out T, *, T, in T?, *, T>.case_5() {
if (this is InterfaceWithFiveTypeParameters1<*, *, *, *, *>) {
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T> & InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T>")!>this<!>.itest1()
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T>")!>this<!>.itest1()
itest1()
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T> & InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T>")!>this<!>.test()
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T> & InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T>")!>this<!>.x
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T> & InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T>")!>this<!>.y
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T>")!>this<!>.test()
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T>")!>this<!>.x
<!DEBUG_INFO_EXPRESSION_TYPE("InterfaceWithFiveTypeParameters1<*, *, *, *, *> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T> & ClassWithSixTypeParameters<out T, *, T, in T?, *, T>")!>this<!>.y
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>x<!>
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>y<!>
}
@@ -98,8 +98,8 @@ fun <T> T.case_8() {
*/
fun <T> T.case_9() {
if (this is String) {
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & T!! & kotlin.String & T!!")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & T!! & kotlin.String & T!!")!>this<!>.length
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & T!! & T")!>this<!>
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.String & T!! & T")!>this<!>.length
length
}
}