anchor.diff:  import "dart:async";
   main() {
     Future<int> f;
  +  var x = f.then<Future<List<int>>>(/*info:INFERRED_TYPE_CLOSURE*/(x) => /*info:INFERRED_TYPE_LITERAL*/[]);
  +  Future<List<int>> y = x;
  +}
  +    ''');
  +  }
  +
  +  void test_futureThen_explicitFuture_comment() {
  +    checkFile(r'''
  +import "dart:async";
  +main() {
  +  Future<int> f;
     var x = f.then/*<Future<List<int>>>*/(/*info:INFERRED_TYPE_CLOSURE*/(x) => /*info:INFERRED_TYPE_LITERAL*/[]);
     Future<List<int>> y = x;
   }
  
positive.code:   MyFuture() {}
    MyFuture.value([T x]) {}
    dynamic noSuchMethod(invocation);
    MyFuture/*<S>*/ then/*<S>*/(dynamic f(T x), {Function onError}) => null;
  }
  
  $declared f;
  
negative.code:   }
  
    void test_futureUnion_asyncConditional() {
      String build({String declared, String downwards, String upwards}) => '''
  import 'dart:async';
  class MyFuture<T> implements Future<T> {
    MyFuture() {}
    MyFuture.value(T x) {}
    dynamic noSuchMethod(invocation);
    MyFuture<S> then<S>(dynamic f(T x), {Function onError}) => null;
  }
  
  $downwards<int> g1(bool x) async {
    return x ? 42 : /*info:INFERRED_TYPE_ALLOCATION*/new $upwards.value(42); }
  $downwards<int> g2(bool x) async =>
    x ? 42 : /*info:INFERRED_TYPE_ALLOCATION*/new $upwards.value(42);
  $downwards<int> g3(bool x) async {
    var y = x ? 42 : /*info:INFERRED_TYPE_ALLOCATION*/new $upwards.value(42);
    return y;
  }
      ''';
      checkFile(build(downwards: "Future", upwards: "Future"));
      checkFile(build(downwards: "Future", upwards: "MyFuture"));
    }
  
    void test_futureUnion_asyncConditional_comment() {
      String build({String declared, String downwards, String upwards}) => '''
  import 'dart:async';
  class MyFuture<T> implements Future<T> {
  