More correct suppression of error
This commit is contained in:
+1
-3
@@ -554,6 +554,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
||||
}
|
||||
else {
|
||||
JetType actualType = possiblyBareType.getActualType();
|
||||
if (actualType.isError()) return null;
|
||||
if (isAllowedInClassLiteral(actualType)) {
|
||||
type = actualType;
|
||||
}
|
||||
@@ -591,9 +592,6 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user