FE: Fix null assertion error when left is CollectionLiteral

#KT-49961 fixed
This commit is contained in:
Xin Wang
2022-05-16 22:33:19 +08:00
committed by Victor Petukhov
parent bd299ed12c
commit eb1d7110ec
9 changed files with 59 additions and 1 deletions
@@ -0,0 +1,10 @@
class Xyz {
fun x(): String? {
return try {
<!UNSUPPORTED!>[<!UNRESOLVED_REFERENCE!>a<!>]<!> <!USELESS_ELVIS!>?: <!UNRESOLVED_REFERENCE!>XYZ<!><!>
}
catch (e: Exception) {
null
}
}
}
@@ -0,0 +1,10 @@
class Xyz {
fun x(): String? {
return try {
<!TYPE_MISMATCH, UNSUPPORTED!>[<!UNRESOLVED_REFERENCE!>a<!>]<!> <!USELESS_ELVIS!>?: <!UNRESOLVED_REFERENCE!>XYZ<!><!>
}
catch (e: Exception) {
null
}
}
}
@@ -0,0 +1,9 @@
package
public final class Xyz {
public constructor Xyz()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
public final fun x(): kotlin.String?
}