Skip to content

Commit

Permalink
Force first argument in quasi_label
Browse files Browse the repository at this point in the history
In order to generate improved error stacks
  • Loading branch information
hadley committed Oct 16, 2017
1 parent aa439a6 commit e65bd2b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/expectation.R
Expand Up @@ -87,6 +87,8 @@ is.expectation <- function(x) inherits(x, "expectation")
#' # variable name
#' show_failure(expect_equal(f(!!i), !!(i * 10)))
quasi_label <- function(quo, label = NULL) {
force(quo)

list(
val = eval_bare(get_expr(quo), get_env(quo)),
lab = label %||% quo_label(quo)
Expand Down

0 comments on commit e65bd2b

Please sign in to comment.