Skip to content

Commit

Permalink
More accurate comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Oct 25, 2024
1 parent d5244e2 commit 1d54d2d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions R/eval-walk.R
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,13 @@ eval_literal <- function(expr, data_mask, context_mask) {

if (internal$uniquely_named && is_character(expr)) {
# Since tidyselect allows repairing data frames with duplicate names by
# renaming positions, we can't check the input for duplicates. Instead, we
# check the output. But in case of character literals, checking the output
# doesn't work because we use `vctrs::vec_as_location()` to transform the
# strings to locations and it ignores duplicate names. So we instead check
# the input here, since it's not possible to repair duplicate names by
# matching them by name. This avoids an inconsistency with the symbolic
# path (#346).
# renaming or selecting positions, we can't check the input for duplicates.
# Instead, we check the output. But in case of character literals, checking
# the output doesn't work because we use `vctrs::vec_as_location()` to
# transform the strings to locations and it ignores duplicate names. So we
# instead check the input here, since it's not possible to repair duplicate
# names by matching them by name. This avoids an inconsistency with the
# symbolic path (#346).
vctrs::vec_as_names(
internal$vars,
repair = "check_unique",
Expand Down

0 comments on commit 1d54d2d

Please sign in to comment.