anchor.diff:    }
   
     /**
  +   * Interpret the given [param] as a parameter in a synthetic typedef, and
  +   * format it as a string.
  +   */
  +  String formatParam(UnlinkedParam param) {
  +    if (param.isFunctionTyped) {
  +      // TODO(paulberry): fix this case.
  +      return 'BAD(${JSON.encode(param)})';
  +    }
  +    String result;
  +    if (param.type != null) {
  +      result = '${formatType(param.type)} ${param.name}';
  +    } else {
  +      result = param.name;
  +    }
  +    if (param.kind == UnlinkedParamKind.named) {
  +      result = '{$result}';
  +    } else if (param.kind == UnlinkedParamKind.positional) {
  +      result = '[$result]';
  +    }
  +    return result;
  +  }
  +
  +  /**
      * Convert the reference with index [index] into a string.  If [typeOf] is
      * `true`, the reference is being used in the context of naming a type, so
      * if the entity being referenced is not a type, it will be enclosed in
  
positive.code:       assert(name.isEmpty);
        result += 'localFunction[${linkedRef.localIndex}]';
      }
      if (!typeOf || linkedRef.kind == ReferenceKind.classOrEnum) {
        return result;
      } else {
        return 'typeof($result)';
  
negative.code:     String result = formatReference(entityRef.reference, typeOf: true);
      if (entityRef.typeArguments.isNotEmpty) {
        result += '<${entityRef.typeArguments.map(formatType).join(', ')}>';
      }
      if (implicitFunctionTypeIndices.isNotEmpty) {
        result =
            'parameterOf($result, ${implicitFunctionTypeIndices.join(', ')})';
      }
      return result;
    }
  