rlang
rlang copied to clipboard
list2() doesn't evaluate arguments in way ellipsis::check_dots_used() checks
f <- function(...) {
ellipsis::check_dots_used()
purrr::list_modify(list(a = 1), ...)
}
f(a = 2)
#> Error: 1 components of `...` were not used.
#>
#> We detected these problematic arguments:
#> * `a`
#>
#> Did you misspecify an argument?
Simpler reprex:
f <- function(...) {
ellipsis::check_dots_used()
list2(...)
}
f(a = 2)
#> Error in list2(...): could not find function "list2"
#> Error: 1 components of `...` were not used.
#>
#> We detected these problematic arguments:
#> * `a`
#>
#> Did you misspecify an argument?
Created on 2020-05-15 by the reprex package (v0.3.0)
I'm going to move to rlang since that's where any fix would have to happen (I think)
Another one (I believe could not find function "list2"
error is not intended):
library(rlang)
f <- function(...) {
ellipsis::check_dots_used()
list2(...)
}
f(a = 2)
#> Error: 1 components of `...` were not used.
#>
#> We detected these problematic arguments:
#> * `a`
#>
#> Did you misspecify an argument?
Created on 2020-05-16 by the reprex package (v0.3.0)