More correct suppression of error

This commit is contained in:
Valentin Kipyatkov
2015-08-10 19:16:59 +03:00
parent bce691bf8c
commit 209281fbab
@@ -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;