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

New feature: DEE - Check if dead expressions have never-assigned vars? #63

Open
jcrodriguez1989 opened this issue Aug 20, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@jcrodriguez1989
Copy link
Owner

The optimizer is currently eliminating any dead expression, however, the code:

foo <- function() {
  x
  return(8818)
}

is not equivalent to

foo <- function() {
  return(8818)
}

Both functions will return the same value, however, the first one will give an error similar to:

foo()
## Error in foo() : object 'x' not found
@saxenism
Copy link
Contributor

saxenism commented Mar 10, 2020

Hey @jcrodriguez1989 , please have a look here. It's a possible solution. Let me know how it can be improved further. And yeah, all the build tests are passing.

saxenism pushed a commit to saxenism/rco that referenced this issue Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants