anchor.diff:          compareConstAstLists(
               r.arguments?.arguments, o.arguments?.arguments, desc);
           Element expectedElement = o.element;
  -        if (oName is PrefixedIdentifier && o.constructorName != null) {
  +        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.
  
positive.code:         expect(o.atSign.lexeme, r.atSign.lexeme, reason: desc);
          Identifier rName = r.name;
          Identifier oName = o.name;
          if (oName is PrefixedIdentifier && o.constructorName != 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);
  
negative.code:     checkLibrary('f() {} g() {}');
    }
  
    test_unresolved_annotation_namedConstructorCall_noClass() {
      checkLibrary('@foo.bar() class C {}');
    }
  
    test_unresolved_annotation_namedConstructorCall_noConstructor() {
      checkLibrary('@String.foo() class C {}');
    }
  
    test_unresolved_annotation_prefixedIdentifier_badPrefix() {
      checkLibrary('@foo.bar class C {}');
    }
  
    test_unresolved_annotation_prefixedIdentifier_noDeclaration() {
      checkLibrary('import "dart:async" as foo; @foo.bar class C {}');
    }
  
    test_unresolved_annotation_prefixedNamedConstructorCall_badPrefix() {
      checkLibrary('@foo.bar.baz() class C {}');
    }
  
    test_unresolved_annotation_prefixedNamedConstructorCall_noClass() {
      checkLibrary('import "dart:async" as foo; @foo.bar.baz() class C {}');
    }
  
    @failingTest // See dartbug.com/25706
    test_unresolved_annotation_prefixedNamedConstructorCall_noConstructor() {
      checkLibrary('import "dart:async" as foo; @foo.Future.bar() class C {}');
    }
  
    test_unresolved_annotation_prefixedUnnamedConstructorCall_badPrefix() {
      checkLibrary('@foo.bar() class C {}');
    }
  
    test_unresolved_annotation_prefixedUnnamedConstructorCall_noClass() {
      checkLibrary('import "dart:async" as foo; @foo.bar() class C {}');
    }
  
    test_unresolved_annotation_simpleIdentifier() {
      checkLibrary('@foo class C {}');
    }
  
    test_unresolved_annotation_unnamedConstructorCall_noClass() {
      checkLibrary('@foo() class C {}');
    }
  
    test_unresolved_export() {
      allowMissingFiles = true;
      checkLibrary("export 'foo.dart';", allowErrors: true);
  