You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can we support the "trailing comma" idiom with check_dots_empty(), the same way as we do in list() ?
fun<-function(..., a=NULL) {
rlang::check_dots_empty()
}
# Expected
fun(1)
#> Error in `fun()`:#> ! `...` must be empty.#> x Problematic argument:#> • ..1 = 1#> ℹ Did you forget to name an argument?# Expected
fun(a=1)
#> NULL# Unexpected
fun(
a=1,
)
#> Error in `fun()`:#> ! `...` must be empty.#> x Problematic argument:#> • ..1 = <empty>#> ℹ Did you forget to name an argument?
Can we support the "trailing comma" idiom with
check_dots_empty()
, the same way as we do inlist()
?Created on 2022-04-19 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: