-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior
Description
library(dplyr)
# check_type
case_when(TRUE ~ 1, TRUE ~ "x")
#> Error in names(message) <- `*vtmp*`: 'names' attribute [1] must be the same length as the vector [0]
# check_class
case_when(TRUE ~ 1, TRUE ~ structure(1, class = "foo"))
#> Error in names(message) <- `*vtmp*`: 'names' attribute [1] must be the same length as the vector [0]These are supposed to report on invalid types and classes, respectively.
This happens because we are missing an argument here in replace_with(). That NULL is probably intended to be passed on to reason, but it is instead being matched to name and that doesn't work. A character name is required for that error path to run correctly.
Line 174 in 1cff4b9
| out <- replace_with(out, query[[i]] & !replaced, value[[i]], NULL, error_call = error_call) |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behavior