private static <Arg> ArgInfo<Arg> @Nullable [] mapSimple(GrClosureParameter @NotNull [] params,
                                                           Arg @NotNull [] args,
                                                           @NotNull Function<? super Arg, ? extends PsiType> typeComputer,
                                                           @NotNull PsiElement context,
                                                           int optional,
                                                           boolean partial) {
    if (args.length > params.length && !partial) return null;

    //noinspection unchecked
    ArgInfo<Arg>[] map = new ArgInfo[params.length];
    int notOptional = params.length - optional;
    int optionalArgs = args.length - notOptional;

    if (notOptional > args.length && !partial) return null;

    int cur = 0;
    for (int i = 0; i < args.length; i++, cur++) {
      while (optionalArgs == 0 && cur < params.length && params[cur].isOptional()) {
        cur++;
      }
      if (cur == params.length) return partial ? map : null;
      if (params[cur].isOptional()) optionalArgs--;
      final PsiType type = typeComputer.fun(args[i]);
      if (!isAssignableByConversion(params[cur].getType(), type, context)) return partial ? map : null;
      map[cur] = new ArgInfo<>(args[i], type);
    }
    for (int i = 0; i < map.length; i++) {
      if (map[i] == null) map[i] = ArgInfo.empty();
    }
    return map;
  }
private static <Arg> ArgInfo<Arg> @Nullable [] mapSimple(GrClosureParameter @NotNull [] params,
                                                           Arg @NotNull [] args,
                                                           @NotNull Function<? super Arg, ? extends PsiType> typeComputer,
                                                           @NotNull PsiElement context,
                                                           int optional,
                                                           boolean partial)