anchor.diff:      });
     }
   
  -  // Emit call to a specific method.
  -  void emitCall(int depth, String name, List<DartType> proto,
  -      {RhsFilter rhsFilter, bool includeSemicolon = false}) {
  -    emitLn(name, newline: false);
  -    emitExprList(depth + 1, proto, rhsFilter: rhsFilter);
  -    if (includeSemicolon) {
  -      emit(';');
  -    }
  -  }
  -
     // Helper for a method call.
  -  bool pickedCall(
  -      int depth, DartType tp, String name, List<List<DartType>> protos, int m,
  +  bool pickedCall(int depth, DartType tp, List<Method> methods, int m,
         {RhsFilter rhsFilter}) {
       for (int i = m - 1; i >= 0; i--) {
  -      if (tp == protos[i][0]) {
  -        emitCall(depth + 1, "$name$i", protos[i], rhsFilter: rhsFilter);
  +      if (tp == methods[i].returnType) {
  +        bool extensionApplication = methods[i] is ExtensionMethod && coinFlip();
  +        methods[i].emitCall(depth + 1,
  +            rhsFilter: rhsFilter, extensionApplication: extensionApplication);
           return true;
         }
       }
  
positive.code:     emitNewline();
    }
  
    void emitMethod(
        String name, int index, List<DartType> method, bool isFfiMethod) {
      final type = method[0].name;
      final methodName = '$name${isFfiMethod ? "Ffi" : ''}$index';
      if (isFfiMethod) {
        emitFfiTypedef("${name}Ffi${index}Type", method);
      }
      emitLn('$type $methodName', newline: false);
      emitParenWrapped(() => emitParDecls(method));
      if (!isFfiMethod && rollDice(10)) {
        // Emit a method using "=>" syntax.
        emit(' => ');
        emitExpr(0, method[0], includeSemicolon: true);
      } else {
        emitBraceWrapped(() {
          assert(localVars.isEmpty);
          if (emitStatements(0)) {
            emitReturn();
          }
          assert(localVars.isEmpty);
        });
      }
      if (isFfiMethod) {
        emitFfiCast("${name}${index}", "${name}Ffi${index}",
            "${name}Ffi${index}Type", method);
      }
      emitNewline();
      emitNewline();
    }
  
    void emitMethods(String name, List<List<DartType>> methods,
        [List<bool> ffiStatus]) {
      for (int i = 0; i < methods.length; i++) {
        List<DartType> method = methods[i];
        currentMethod = i;
        final bool isFfiMethod = ffiStatus != null && ffiStatus[i];
        emitMethod(name, i, method, isFfiMethod);
        currentMethod = null;
      }
    }
  
negative.code:     iterVars = <String>[];
      globalVars = fillTypes1(limit: numGlobalVars);
      globalVars.addAll(dartType.allTypes);
      globalMethods = getMethods(
          numGlobalMethods, numMethodParams, MethodType.globalMethod,
          namePrefix: methodName);
      classFields = fillTypes2(limit2: numClasses, limit1: numLocalVars);
      final int numClassMethods = 1 + numClasses - classFields.length;
      classMethods =
          getClassMethods(classFields.length, numClassMethods, numMethodParams);
      virtualClassMethods = <Map<int, List<int>>>[];
      classParents = <int>[];
      // Setup optional ffi methods and types.
      if (ffi) {
        globalMethods.addAll(getMethods(
            numGlobalMethods, numMethodParams, MethodType.ffiMethod,
            namePrefix: methodName));
      }
      // Generate.
      emitHeader();
      emitVariableDeclarations(varName, globalVars);
      emitMethods(globalMethods);
      emitClasses();
      emitMain();
      // Sanity.
  