anchor.diff:      // transitivity for 'JsBuilder' objects, assigning them to
       // '(String) -> dynamic'. The declared type of 'JsBuilder.call' is
       // '(String, [dynamic]) -> Expression'.
  -    Source source = addSource(r'''
  +    await assertNoErrorsInCode(r'''
   class I {
     int call([int x]) => 0;
   }
  
positive.code:   y<String>("hello");
  }
  ''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_implicitThisReferenceInInitializer_constructorName() async {
      Source source = addSource(r'''
  class A {
    A.named() {}
  }
  class B {
    var v;
    B() : v = new A.named();
  }''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_implicitThisReferenceInInitializer_prefixedIdentifier() async {
      Source source = addSource(r'''
  class A {
    var f;
  }
  class B {
    var v;
    B(A a) : v = a.f;
  }''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_implicitThisReferenceInInitializer_qualifiedMethodInvocation() async {
      Source source = addSource(r'''
  class A {
    f() {}
  }
  class B {
    var v;
    B() : v = new A().f();
  }''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_implicitThisReferenceInInitializer_qualifiedPropertyAccess() async {
      Source source = addSource(r'''
  class A {
    var f;
  }
  class B {
    var v;
    B() : v = new A().f;
  }''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_implicitThisReferenceInInitializer_staticField_thisClass() async {
      Source source = addSource(r'''
  class A {
    var v;
    A() : v = f;
    static var f;
  }''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_implicitThisReferenceInInitializer_staticGetter() async {
      Source source = addSource(r'''
  class A {
    var v;
    A() : v = f;
    static get f => 42;
  }''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_implicitThisReferenceInInitializer_staticMethod() async {
      Source source = addSource(r'''
  class A {
    var v;
    A() : v = f();
    static f() => 42;
  }''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_implicitThisReferenceInInitializer_topLevelField() async {
      Source source = addSource(r'''
  class A {
    var v;
    A() : v = f;
  }
  var f = 42;''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_implicitThisReferenceInInitializer_topLevelFunction() async {
      Source source = addSource(r'''
  class A {
    var v;
    A() : v = f();
  }
  f() => 42;''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_implicitThisReferenceInInitializer_topLevelGetter() async {
      Source source = addSource(r'''
  class A {
    var v;
    A() : v = f;
  }
  get f => 42;''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_implicitThisReferenceInInitializer_typeParameter() async {
      Source source = addSource(r'''
  class A<T> {
    var v;
    A(p) : v = (p is T);
  }''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_importDuplicatedLibraryName() async {
      Source source = addSource(r'''
  library test;
  import 'lib.dart';
  import 'lib.dart';''');
      addNamedSource("/lib.dart", "library lib;");
      await computeAnalysisResult(source);
      assertErrors(source, [
        HintCode.UNUSED_IMPORT,
        HintCode.UNUSED_IMPORT,
        HintCode.DUPLICATE_IMPORT
      ]);
      verify([source]);
    }
  
    test_importDuplicatedLibraryUnnamed() async {
      Source source = addSource(r'''
  library test;
  import 'lib1.dart';
  import 'lib2.dart';''');
      addNamedSource("/lib1.dart", "");
      addNamedSource("/lib2.dart", "");
      await computeAnalysisResult(source);
      assertErrors(source, [
        // No warning on duplicate import (https://github.com/dart-lang/sdk/issues/24156)
        HintCode.UNUSED_IMPORT,
        HintCode.UNUSED_IMPORT
      ]);
      verify([source]);
    }
  
    test_importOfNonLibrary_libraryDeclared() async {
      Source source = addSource(r'''
  library lib;
  import 'part.dart';
  A a;''');
      addNamedSource("/part.dart", r'''
  library lib1;
  class A {}''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_importOfNonLibrary_libraryNotDeclared() async {
      Source source = addSource(r'''
  library lib;
  import 'part.dart';
  A a;''');
      addNamedSource("/part.dart", "class A {}");
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_importPrefixes_withFirstLetterDifference() async {
      Source source = addSource(r'''
  library L;
  import 'lib1.dart' as math;
  import 'lib2.dart' as path;
  main() {
    math.test1();
    path.test2();
  }''');
      addNamedSource("/lib1.dart", r'''
  library lib1;
  test1() {}''');
      addNamedSource("/lib2.dart", r'''
  library lib2;
  test2() {}''');
      await computeAnalysisResult(source);
      assertNoErrors(source);
      verify([source]);
    }
  
    test_inconsistentCaseExpressionTypes() async {
      Source source = addSource(r'''
  f(var p) {
    switch (p) {
      case 1:
  
negative.code:     }
      return 0;
    }
  }
  ''');
    }
  
    test_mixin_of_mixin_type_argument_inference() async {
  