-
Notifications
You must be signed in to change notification settings - Fork 150
Open
Description
match_parent <- function(x) {
rlang::arg_match(x, c("a", "b"))
}
match0_parent <- function(x) {
rlang::arg_match0(x, c("a", "b"))
}
match0_parent(c("a", "b", "a"))
#> Error in `rlang::arg_match0()`:
#> ! `arg` must be a string or have the same length as `values`.
match_parent(c("a", "b", "c"))
#> Error in `match_parent()`:
#> ! `x` must be one of "a" or "b", not "a".
match_parent(c("a", "b", "a"))
#> [1] "a"
Created on 2025-10-13 with reprex v2.1.1
I would expect the match_parent()
calls to give an error similar to the error produced by match0_parent()
Metadata
Metadata
Assignees
Labels
No labels