Remove reference to error type constructor from unresolved annotation

This commit is contained in:
Nikolay Krasko
2012-08-29 22:47:50 +04:00
parent 9a9efd5b2f
commit 78cb5381f7
3 changed files with 15 additions and 0 deletions
@@ -186,6 +186,11 @@ public class CallResolver {
JetTypeReference typeReference = expression.getTypeReference();
assert typeReference != null;
JetType constructedType = typeResolver.resolveType(context.scope, typeReference, context.trace, true);
if (ErrorUtils.isErrorType(constructedType)) {
return checkArgumentTypesAndFail(context);
}
DeclarationDescriptor declarationDescriptor = constructedType.getConstructor().getDeclarationDescriptor();
if (declarationDescriptor instanceof ClassDescriptor) {
ClassDescriptor classDescriptor = (ClassDescriptor) declarationDescriptor;