Fix tests with type annotations
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
+2
-1
@@ -122,7 +122,8 @@ public class LazyAnnotationDescriptor(
|
||||
private val type = c.storageManager.createLazyValue {
|
||||
c.annotationResolver.resolveAnnotationType(
|
||||
c.scope,
|
||||
annotationEntry
|
||||
annotationEntry,
|
||||
c.trace
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user