FIR checker: report nullable expression as LHS of class literals

This commit is contained in:
Jinseong Jeon
2021-03-04 16:38:05 -08:00
committed by Mikhail Glukhikh
parent 33c5b49632
commit 5ba5b63dee
12 changed files with 68 additions and 37 deletions
@@ -10,11 +10,11 @@ val l2 = <!NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!>List?::class<!>
fun <T : Any> foo() {
val t1 = <!TYPE_PARAMETER_IS_NOT_AN_EXPRESSION!>T<!>::class
val t2 = <!TYPE_PARAMETER_IS_NOT_AN_EXPRESSION!>T<!>?::class
val t2 = <!NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!><!TYPE_PARAMETER_IS_NOT_AN_EXPRESSION!>T<!>?::class<!>
}
inline fun <reified T : Any> bar() {
val t3 = T?::class
val t3 = <!NULLABLE_TYPE_IN_CLASS_LITERAL_LHS!>T?::class<!>
}
val m = Map<String>::class