Skip to content

Commit f0f0105

Browse files
committed
Also message about args fed to f dots when it has dots first
1 parent 10fb9e4 commit f0f0105

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

R/utils.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ assert_sufficient_f_args <- function(f, ...) {
134134
mandatory_args_mapped_names <- remaining_args_names[seq_len(n_f_args_before_dots)]
135135

136136
if (n_f_args_before_dots < n_mandatory_f_args) {
137-
mandatory_f_args_in_f_dots = tail(mandatory_f_args_labels, -n_f_args_before_dots)
137+
mandatory_f_args_in_f_dots =
138+
tail(mandatory_f_args_labels, n_mandatory_f_args - n_f_args_before_dots)
138139
Warn(sprintf("`f` might not have enough positional arguments before its `...`; in the current `epi[x]_slide` call, the %s will be included in `f`'s `...`; if `f` doesn't expect those arguments, it may produce confusing error messages", cli::ansi_collapse(mandatory_f_args_in_f_dots)),
139140
class = "epiprocess__assert_sufficient_f_args__mandatory_f_args_passed_to_f_dots",
140141
epiprocess__f = f,

0 commit comments

Comments
 (0)