Skip to content

Commit

Permalink
preserve integer64 class
Browse files Browse the repository at this point in the history
  • Loading branch information
nbenn authored and aviator-bot committed Dec 17, 2023
1 parent 2de310b commit 2c65a72
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion R/spec-result-roundtrip.R
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,16 @@ test_select_with_null <- function(...) {
test_select(..., .add_null = "below")
}

as_list_with_preserve_class <- function(x) {
lapply(x, `class<-`, attr(x, "class"))
}

test_select <- function(con, ..., .dots = NULL, .add_null = "none",
.ctx, .envir = parent.frame()) {
values <- c(list(...), .dots)
values <- c(
as_list_with_preserve_class(list(...)),
as_list_with_preserve_class(.dots)
)

value_is_formula <- vapply(values, is.call, logical(1L))
names(values)[value_is_formula] <- lapply(values[value_is_formula], "[[", 2L)
Expand Down

0 comments on commit 2c65a72

Please sign in to comment.