anchor.diff:    return _rtiEval(instanceType(instance), recipe);
   }
   
  +bool _isClosure(object) => _Utils.instanceOf(object,
  +    JS_BUILTIN('depends:none;effects:none;', JsBuiltin.dartClosureConstructor));
  +
  +Rti _closureFunctionType(closure) {
  +  var signatureName = JS_GET_NAME(JsGetName.SIGNATURE_NAME);
  +  var signature = JS('', '#[#]', closure, signatureName);
  +  if (signature != null) {
  +    if (JS('bool', 'typeof # == "number"', signature)) {
  +      return getTypeFromTypesTable(_Utils.asInt(signature));
  +    }
  +    return _castToRti(JS('', '#[#]()', closure, signatureName));
  +  }
  +  return null;
  +}
  +
  +// Subclasses of Closure are synthetic classes. The synthetic classes all
  +// extend a 'normal' class (Closure, BoundClosure, StaticClosure), so make
  +// them appear to be the superclass.
  +// TODO(sra): Can this be done less expensively, e.g. by putting $ti on the
  +// prototype of Closure/BoundClosure/StaticClosure classes?
  +Rti _closureInterfaceType(closure) => _instanceTypeFromConstructor(
  +    JS('', '#.__proto__.__proto__.constructor', closure));
  +
   /// Returns the Rti type of [object]. Closures have both an interface type
   /// (Closures implement `Function`) and a structural function type. Uses
   /// [testRti] to choose the appropriate type.
   ///
   /// Called from generated code.
   Rti instanceOrFunctionType(object, Rti testRti) {
  -  if (Rti._isFunctionType(testRti)) {
  -    Rti rti = _instanceFunctionType(object);
  -    if (rti != null) return rti;
  -  }
  -  return instanceType(object);
  +  if (_isClosure(object)) {
  +    if (Rti._isUnionOfFunctionType(testRti)) {
  +      // If [testRti] is e.g. `FutureOr<Action>` (where `Action` is some
  +      // function type), we don't need to worry about the `Future<Action>`
  +      // branch because closures can't be `Future`s.
  +      Rti rti = _closureFunctionType(object);
  +      if (rti != null) return rti;
  +    }
  +    return _closureInterfaceType(object);
  +  }
  +  return _nonClosureInstanceType(object);
   }
   
   /// Returns the Rti type of [object].
   /// Called from generated code.
   Rti instanceType(object) {
  +  if (_isClosure(object)) return _closureInterfaceType(object);
  +  return _nonClosureInstanceType(object);
  +}
  +
  +Rti _nonClosureInstanceType(object) {
     // TODO(sra): Add specializations of this method. One possible way is to
     // arrange that the interceptor has a _getType method that is injected into
     // DartObject, Interceptor and JSArray. Then this method can be replaced-by
  
positive.code:           'depends:none;effects:none;', JsBuiltin.dartObjectConstructor))) {
      var rti = JS('', r'#[#]', object, JS_GET_NAME(JsGetName.RTI_NAME));
      if (rti != null) return _castToRti(rti);
  
      // Subclasses of Closure are synthetic classes. The synthetic classes all
      // extend a 'normal' class (Closure, BoundClosure, StaticClosure), so make
      // them appear to be the superclass.
      // TODO(sra): Can this be done less expensively, e.g. by putting $ti on the
      // prototype of Closure/BoundClosure/StaticClosure classes?
      var closureClassConstructor = JS_BUILTIN(
          'depends:none;effects:none;', JsBuiltin.dartClosureConstructor);
      if (_Utils.instanceOf(object, closureClassConstructor)) {
        return _instanceTypeFromConstructor(
            JS('', '#.__proto__.__proto__.constructor', object));
      }
  
      return _instanceTypeFromConstructor(JS('', '#.constructor', object));
    }
  
negative.code:     }
    }
  
    if (isEitherFunctionKind(t)) {
      return _isFunctionSubtype(universe, s, sEnv, t, tEnv);
    }
  
    if (isEitherFunctionKind(s)) {
      return isFunctionType(t);
    }
  
  