Skip to content

Commit

Permalink
Merge pull request #447 from cynkra/b-template-class
Browse files Browse the repository at this point in the history
fix: Tweak generated code so that it works out of the box
  • Loading branch information
aviator-app[bot] committed Jul 3, 2024
2 parents 95a63df + bafc260 commit ee8ee41
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/s3-atomic.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ opts_atomic <- function(
fill <- rlang::arg_match(fill),
abort_not_boolean(compress)
)
if (any(c("unicode_representation", "escape") %in% ...names())) {
if (any(c("unicode_representation", "escape") %in% names(list(...)))) {
msg <- "`unicode_representation` and `escape` are deprecated in `opts_atomic()`"
info1 <- "Set those in `opts_character()` instead for the same effect"
info2 <- "Set those directly in the main function (e.g. `construct()`) to apply them on both character vectors, symbols and argument names"
Expand Down
2 changes: 1 addition & 1 deletion inst/new_class_template_commented.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ opts_.CLASS1. <- function(constructor = c(".CONSTRUCTOR.", "next"), ...) {
if (is_corrupted_.CLASS1.(x) || opts$constructor == "next") return(NextMethod())
# This odd looking code dispatches to a method based on the name of
# the constructor rather than the class
UseMethod(".cstr_construct..CLASS1.", structure(NA, .CLASS1. = opts$constructor))
UseMethod(".cstr_construct..CLASS1.", structure(NA, class = opts$constructor))
}

is_corrupted_.CLASS1. <- function(x) {
Expand Down

0 comments on commit ee8ee41

Please sign in to comment.