anchor.diff:          expect(o.atSign.lexeme, r.atSign.lexeme, reason: desc);
           Identifier rName = r.name;
           Identifier oName = o.name;
  -        if (oName is PrefixedIdentifier && o.constructorName != null) {
  +        if (oName is PrefixedIdentifier &&
  +            o.constructorName != null &&
  +            o.element != null) {
             // E.g. `@prefix.cls.ctor`.  This gets resynthesized as `@cls.ctor`,
             // with `cls.ctor` represented as a PrefixedIdentifier.
             expect(rName, new isInstanceOf<PrefixedIdentifier>(), reason: desc);
  
positive.code: 
    void compareElementAnnotations(ElementAnnotationImpl resynthesized,
        ElementAnnotationImpl original, String desc) {
      expect(resynthesized.element, isNotNull, reason: desc);
      expect(resynthesized.element.kind, original.element.kind, reason: desc);
      expect(resynthesized.element.location, original.element.location,
          reason: desc);
      expect(resynthesized.compilationUnit, isNotNull, reason: desc);
      expect(resynthesized.compilationUnit.location,
          original.compilationUnit.location,
  
negative.code:         compareConstAstLists(
              r.arguments?.arguments, o.arguments?.arguments, desc);
          Element expectedElement = o.element;
          if (oName is PrefixedIdentifier &&
              o.constructorName != null &&
              o.element != null) {
            // Due to dartbug.com/25706, [o.element] incorrectly points to the
            // class rather than the named constructor.  Hack around this.
            // TODO(paulberry): when dartbug.com/25706 is fixed, remove this.
  