anchor.diff:    }
   
     // Handle non-generic functions.
  -  return _isFunctionSubtype(t1, t2, strictMode);
  +  return _isFunctionSubtype(JS<FunctionType>('!', '#', t1),
  +      JS<FunctionType>('!', '#', t2), strictMode);
   }
   
   @notNull
  
positive.code: 
  /// Returns true if [ft1] <: [ft2].
  @notNull
  bool _isFunctionSubtype(ft1, ft2, @notNull bool strictMode) =>
      JS<bool>('!', '''(() => {
    let ret1 = $ft1.returnType;
    let ret2 = $ft2.returnType;
  
    let args1 = $ft1.args;
    let args2 = $ft2.args;
  
    if (args1.length > args2.length) {
      return false;
    }
  
    for (let i = 0; i < args1.length; ++i) {
      if (!$_isSubtype(args2[i], args1[i], strictMode)) {
        return false;
      }
    }
  
    let optionals1 = $ft1.optionals;
    let optionals2 = $ft2.optionals;
  
    if (args1.length + optionals1.length < args2.length + optionals2.length) {
      return false;
    }
  
    let j = 0;
    for (let i = args1.length; i < args2.length; ++i, ++j) {
      if (!$_isSubtype(args2[i], optionals1[j], strictMode)) {
        return false;
      }
    }
  
    for (let i = 0; i < optionals2.length; ++i, ++j) {
      if (!$_isSubtype(optionals2[i], optionals1[j], strictMode)) {
        return false;
      }
    }
  
negative.code:   //    in the superclass.
    // 3) With strict null checking disabled, we treat required named params as
    //    optional named params.
    var named1 = ft1.named;
    var requiredNamed1 = ft1.requiredNamed;
    var named2 = ft2.named;
    var requiredNamed2 = ft2.requiredNamed;
    if (!strictMode) {
      // In weak mode, treat required named params as optional named params.
      named1 = JS('!', 'Object.assign({}, #, #)', named1, requiredNamed1);
      named2 = JS('!', 'Object.assign({}, #, #)', named2, requiredNamed2);
      requiredNamed1 = JS('!', '{}');
      requiredNamed2 = JS('!', '{}');
    }
  
    var names = getOwnPropertyNames(requiredNamed1);
    var namesLength = JS<int>('!', '#.length', names);
    for (var i = 0; i < namesLength; ++i) {
      var name = JS('!', '#[#]', names, i);
      var n2 = JS('!', '#[#]', requiredNamed2, name);
      if (JS<bool>('!', '# === void 0', n2)) {
        return false;
      }
    }
    names = getOwnPropertyNames(named2);
    namesLength = JS<int>('!', '#.length', names);
    for (var i = 0; i < namesLength; ++i) {
      var name = JS('!', '#[#]', names, i);
      var n1 = JS('!', '#[#]', named1, name);
      var n2 = JS('!', '#[#]', named2, name);
      if (JS<bool>('!', '# === void 0', n1)) {
        return false;
      }
      if (!_isSubtype(n2, n1, strictMode)) {
        return false;
      }
    }
    names = getOwnPropertyNames(requiredNamed2);
    namesLength = JS<int>('!', '#.length', names);
    for (var i = 0; i < namesLength; ++i) {
      var name = JS('!', '#[#]', names, i);
      var n1 = JS('!', '#[#] || #[#]', named1, name, requiredNamed1, name);
      var n2 = JS('!', '#[#]', requiredNamed2, name);
      if (JS<bool>('!', '# === void 0', n1)) {
        return false;
      }
      if (!_isSubtype(n2, n1, strictMode)) {
        return false;
      }
    }
  
    return _isSubtype(ret1, ret2, strictMode);
  }
  
  /// Number of generic function type variables encountered so far during a
  /// subtype check.
  