From 209281fbab2b98f0a7f8fc511819949d6489ce82 Mon Sep 17 00:00:00 2001 From: Valentin Kipyatkov Date: Mon, 10 Aug 2015 19:16:59 +0300 Subject: [PATCH] More correct suppression of error --- .../types/expressions/BasicExpressionTypingVisitor.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/BasicExpressionTypingVisitor.java b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/BasicExpressionTypingVisitor.java index 74b96d02905..49f3f209d48 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/BasicExpressionTypingVisitor.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/types/expressions/BasicExpressionTypingVisitor.java @@ -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 parameters = typeConstructor.getParameters(); if (parameters.size() != type.getArguments().size()) return false;