Skip to content

Commit

Permalink
Fix logic error in shadow test
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Oct 10, 2024
1 parent ff5e4ab commit 78eaa6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/dsl-parse.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ dsl_parse_check_fixed <- function(exprs, fixed, call) {
}

name <- vcapply(exprs, "[[", "name")
err <- match(name, names(fixed))
if (length(err) > 0) {
eq <- exprs[[err[[1]]]] # just first is easiest to report on
err <- name %in% names(fixed)
if (any(err)) {
eq <- exprs[[which(err)[[1]]]]
dsl_parse_error(
"Value '{eq$name}' in 'fixed' is shadowed by {eq$type}",
"E207", eq$expr, call)
Expand Down

0 comments on commit 78eaa6a

Please sign in to comment.