Refactor and improve class literal type checking code
Infer something sensible instead of error types when an error is reported, such as absence of a type argument for Array or presence of type arguments for other types
This commit is contained in:
@@ -13,4 +13,8 @@ fun <T : Any> foo() {
|
||||
val t2 = <!CLASS_LITERAL_LHS_NOT_A_CLASS!>T?::class<!>
|
||||
}
|
||||
|
||||
val m = Map<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><String><!>::class
|
||||
inline fun <reified T : Any> bar() {
|
||||
val t3 = <!CLASS_LITERAL_LHS_NOT_A_CLASS!>T?::class<!>
|
||||
}
|
||||
|
||||
val m = Map<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><String><!>::class
|
||||
|
||||
Reference in New Issue
Block a user