anchor.diff:  
     @override
     Future<BuildError> resolve() async {
  -    final element = indexedAnnotation.element;
       final annotationIndex = indexedAnnotation.annotationIndex;
   
  -    var libraryResult = await ResolvedLibraryResultImpl.tmp(element.library);
  -    var result = libraryResult.getElementDeclaration(element);
  +    ElementDeclarationResult result;
  +    try {
  +      result = await _resolvedClassResult(indexedAnnotation.element);
  +    } on BuildError catch (buildError) {
  +      return buildError;
  +    }
  +
       List<Annotation> resolvedMetadata = _metadataFromAncestry(result.node);
   
       ElementAnnotation resolvedAnnotation =
  
positive.code:     throw BuildError(
          buildErrors.map((buildError) => buildError.message).join("\n\n"));
    }
  }
  
  class AsyncBuildError extends BuildError {
  
negative.code:           constantEvaluationErrors, indexedAnnotation.element));
      }
  
      ElementDeclarationResult classResult;
      try {
        classResult = await _resolvedClassResult(indexedAnnotation.element);
      } on BuildError catch (buildError) {
        return buildError;
      }
  
      var classDeclaration = classResult.node as ClassDeclaration;
      var resolvedAnnotation =
          classDeclaration.metadata[indexedAnnotation.annotationIndex];
  