No report of wrong class literal for unresolved
This commit is contained in:
+3
@@ -591,6 +591,9 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
TypeConstructor typeConstructor = type.getConstructor();
|
||||
ClassifierDescriptor typeDeclarationDescriptor = typeConstructor.getDeclarationDescriptor();
|
||||
|
||||
// no need to report error if unresolved
|
||||
if (typeDeclarationDescriptor == null || ErrorUtils.isError(typeDeclarationDescriptor)) return true;
|
||||
|
||||
if (typeDeclarationDescriptor instanceof ClassDescriptor) {
|
||||
List<TypeParameterDescriptor> parameters = typeConstructor.getParameters();
|
||||
if (parameters.size() != type.getArguments().size()) return false;
|
||||
|
||||
@@ -13,4 +13,4 @@ fun foo<T : Any>() {
|
||||
val t2 = <!CLASS_LITERAL_LHS_NOT_A_CLASS!>T?::class<!>
|
||||
}
|
||||
|
||||
val m = <!CLASS_LITERAL_LHS_NOT_A_CLASS!>Map<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><String><!>::class<!>
|
||||
val m = Map<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><String><!>::class
|
||||
Reference in New Issue
Block a user