Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eval_call_srcref is not correct with on.exit #4

Open
programLyrique opened this issue Dec 8, 2020 · 0 comments
Open

eval_call_srcref is not correct with on.exit #4

programLyrique opened this issue Dec 8, 2020 · 0 comments

Comments

@programLyrique
Copy link
Collaborator

Given this minimal example:

calls <- do_trace_eval({
    f <- function() {
      1 + 1
      on.exit(eval(as.name("x"), envir = parent.frame()))
    }
    x <- 6
    f()
  })

caller_srcref and eval_call_srcref are equal, but they should not.

caller_srcref is correct and corresponds to where f() is located.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant