Skip to content

Commit

Permalink
fix a couple of typos in the convenience properties
Browse files Browse the repository at this point in the history
  • Loading branch information
lawremi committed Aug 31, 2024
1 parent 600eb07 commit fa861fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/property.R
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ new_list_property <- function(..., validator = NULL, of = class_any, named = NA)
if (identical(named, FALSE) && !is.null(names(value)))
"must not have names",
if (!is.null(validator))
valdiator(value)
validator(value)
)
})
prop$of <- of
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ check_name <- function(name, arg = deparse(substitute(name))) {
check_scalar <- function(scalar, class, arg = deparse(substitute(scalar)))
{
if (length(scalar) != 1 || !class_inherits(scalar, class)) {
type_name <- if (identical(class, class_numeric)) "numeric" else class$name
type_name <- if (identical(class, class_numeric)) "numeric" else class$class
msg <- sprintf("`%s` must be a single %s value", arg, type_name)
stop(msg, call. = FALSE)
}
Expand Down

0 comments on commit fa861fe

Please sign in to comment.