anchor.diff:            resolvedParameters[i] = element;
             nameNode.staticElement = element;
           }
  +        usedNames ??= new HashSet<String>();
           if (!usedNames.add(name)) {
             if (onError != null) {
               onError(CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT, nameNode,
  
positive.code:       List<ParameterElement> parameters,
        void onError(ErrorCode errorCode, AstNode node, [List<Object> arguments]),
        {bool reportAsError: false}) {
      List<ParameterElement> requiredParameters = new List<ParameterElement>();
      List<ParameterElement> positionalParameters = new List<ParameterElement>();
      HashMap<String, ParameterElement> namedParameters =
          new HashMap<String, ParameterElement>();
      for (ParameterElement parameter in parameters) {
        ParameterKind kind = parameter.parameterKind;
        if (kind == ParameterKind.REQUIRED) {
          requiredParameters.add(parameter);
        } else if (kind == ParameterKind.POSITIONAL) {
          positionalParameters.add(parameter);
        } else {
          namedParameters[parameter.name] = parameter;
        }
      }
      List<ParameterElement> unnamedParameters =
          new List<ParameterElement>.from(requiredParameters);
      unnamedParameters.addAll(positionalParameters);
      int unnamedParameterCount = unnamedParameters.length;
      int unnamedIndex = 0;
      NodeList<Expression> arguments = argumentList.arguments;
      int argumentCount = arguments.length;
      List<ParameterElement> resolvedParameters =
          new List<ParameterElement>(argumentCount);
      int positionalArgumentCount = 0;
      HashSet<String> usedNames = new HashSet<String>();
      bool noBlankArguments = true;
      for (int i = 0; i < argumentCount; i++) {
        Expression argument = arguments[i];
        if (argument is NamedExpression) {
          SimpleIdentifier nameNode = argument.name.label;
          String name = nameNode.name;
          ParameterElement element = namedParameters[name];
          if (element == null) {
            ErrorCode errorCode = (reportAsError
                ? CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER
  
negative.code:         }
        }
      }
      if (positionalArgumentCount < requiredParameterCount && noBlankArguments) {
        ErrorCode errorCode = (reportAsError
            ? CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS
            : StaticWarningCode.NOT_ENOUGH_REQUIRED_ARGUMENTS);
        if (onError != null) {
          onError(errorCode, argumentList,
              [requiredParameterCount, positionalArgumentCount]);
        }
      } else if (positionalArgumentCount > unnamedParameterCount &&
          noBlankArguments) {
  