Skip to content

Do not rewrite getters for unused variables #3

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

Open
onsetsu opened this issue Jan 2, 2017 · 0 comments
Open

Do not rewrite getters for unused variables #3

onsetsu opened this issue Jan 2, 2017 · 0 comments

Comments

@onsetsu
Copy link
Member

onsetsu commented Jan 2, 2017

If we have a local variable (could also be a function parameter), that is not assigned (i.e. no setter for that variable), then we also should not inject a getter. E.g.:

let v = 42;
aexpr(() => v);

Without an assignment to v such as v = 17, we do not need to track v for changes!

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

No branches or pull requests

1 participant