anchor.diff:          types.add(str.substring(p, i));
           p = i = i + 2;
         }
  +      if (str[i] == '[') {
  +        hasOptionalArguments = true;
  +        types = optionalParameterTypes;
  +        p = i + 1;
  +      }
  +      if (str[i] == ']') {
  +        types.add(str.substring(p, i));
  +        break;
  +      }
       }
  -    if (str.length > 0) {
  -      types.add(str.substring(p, str.length));
  +    if (str.length > 0 && types == positionalParameterTypes) {
  +      positionalParameterTypes.add(str.substring(p, str.length));
       }
  -    var n = types.length;
  +    _replaceGenericsArguments(genericsArguments, positionalParameterTypes);
  +    _replaceGenericsArguments(genericsArguments, optionalParameterTypes);
  +  }
  +
  +  void _replaceGenericsArguments(
  +      List<String> genericsArguments, List<String> types) {
       genericsArguments?.forEach((a) {
  +      var n = types.length;
         for (var i = 0; i < n; i++) {
           if (a == types[i]) {
             types[i] = 'dynamic';
  
positive.code:       throw new ArgumentError.notNull('fullname');
      }
      _parseParameters(method);
    }
  
    String _getFunctionName(Function func) {
  
negative.code:   }
  
    void _parseNamedParameters(List<String> genericsArguments, String str) {
      int nesting = 0;
      int p = 0;
      String type;
  