Fix tests with type annotations

This commit is contained in:
Svetlana Isakova
2015-10-17 15:48:38 +03:00
parent fafca76ac5
commit 7208efc784
4 changed files with 27 additions and 7 deletions
@@ -180,13 +180,13 @@ public class AnnotationResolver {
}
@NotNull
public JetType resolveAnnotationType(@NotNull LexicalScope scope, @NotNull JetAnnotationEntry entryElement) {
public JetType resolveAnnotationType(@NotNull LexicalScope scope, @NotNull JetAnnotationEntry entryElement, @NotNull BindingTrace trace) {
JetTypeReference typeReference = entryElement.getTypeReference();
if (typeReference == null) {
return ErrorUtils.createErrorType("No type reference: " + entryElement.getText());
}
JetType type = typeResolver.resolveType(scope, typeReference, new BindingTraceContext(), true);
JetType type = typeResolver.resolveType(scope, typeReference, trace, true);
if (!(type.getConstructor().getDeclarationDescriptor() instanceof ClassDescriptor)) {
return ErrorUtils.createErrorType("Not an annotation: " + type);
}
@@ -122,7 +122,8 @@ public class LazyAnnotationDescriptor(
private val type = c.storageManager.createLazyValue {
c.annotationResolver.resolveAnnotationType(
c.scope,
annotationEntry
annotationEntry,
c.trace
)
}