More correct suppression of error
This commit is contained in:
+1
-3
@@ -554,6 +554,7 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
JetType actualType = possiblyBareType.getActualType();
|
JetType actualType = possiblyBareType.getActualType();
|
||||||
|
if (actualType.isError()) return null;
|
||||||
if (isAllowedInClassLiteral(actualType)) {
|
if (isAllowedInClassLiteral(actualType)) {
|
||||||
type = actualType;
|
type = actualType;
|
||||||
}
|
}
|
||||||
@@ -591,9 +592,6 @@ public class BasicExpressionTypingVisitor extends ExpressionTypingVisitor {
|
|||||||
TypeConstructor typeConstructor = type.getConstructor();
|
TypeConstructor typeConstructor = type.getConstructor();
|
||||||
ClassifierDescriptor typeDeclarationDescriptor = typeConstructor.getDeclarationDescriptor();
|
ClassifierDescriptor typeDeclarationDescriptor = typeConstructor.getDeclarationDescriptor();
|
||||||
|
|
||||||
// no need to report error if unresolved
|
|
||||||
if (typeDeclarationDescriptor == null || ErrorUtils.isError(typeDeclarationDescriptor)) return true;
|
|
||||||
|
|
||||||
if (typeDeclarationDescriptor instanceof ClassDescriptor) {
|
if (typeDeclarationDescriptor instanceof ClassDescriptor) {
|
||||||
List<TypeParameterDescriptor> parameters = typeConstructor.getParameters();
|
List<TypeParameterDescriptor> parameters = typeConstructor.getParameters();
|
||||||
if (parameters.size() != type.getArguments().size()) return false;
|
if (parameters.size() != type.getArguments().size()) return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user