anchor.diff:          _emitter.staticFunctionAccess(_commonElements.closureFunctionType),
           _namer.instanceFieldPropertyName(functionField),
           _namer.rtiFieldJsName,
  -      ]);
  +      ]) as jsAst.Fun;
   
     // Returns all stubs for an instantiation class.
     //
     List<StubMethod> generateStubs(
  -      ClassEntity instantiationClass, FunctionEntity member) {
  +      ClassEntity instantiationClass, FunctionEntity? member) {
       // 1. Find the number of type parameters in [instantiationClass].
       int typeArgumentCount = _closedWorld.dartTypes
           .getThisType(instantiationClass)
  
positive.code:     // with filled-in type arguments.
  
      if (callSelectors != null) {
        Set<ParameterStructure> parameterStructures;
        for (Selector selector in callSelectors.keys) {
          CallStructure callStructure = selector.callStructure;
          if (callStructure.typeArgumentCount != 0) continue;
  
negative.code:     assert(typeArgumentCount > 0);
  
      // 2. Find the function field access path.
      late FieldEntity functionField;
      _elementEnvironment.forEachInstanceField(instantiationClass,
          (ClassEntity enclosing, FieldEntity field) {
        if (_closedWorld.fieldAnalysis.getFieldData(field as JField).isElided)
          return;
        if (field.name == '_genericClosure') functionField = field;
      });
  
      String call = _namer.closureInvocationSelectorName;
      Map<Selector, SelectorConstraints>? callSelectors =
          _codegenWorld.invocationsByName(call);
  
      Set<ParameterStructure> computeLiveParameterStructures() {
  