-
Notifications
You must be signed in to change notification settings - Fork 77
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
ES6 default parameters cause two write references #72
Comments
Ping @mysticatea, author of 23bb40b which added the referenced tests. |
escope has been making a writable reference for variable initializers, so I treated default parameters and default values of destructuring as same as that. (Thanks @michaelficarra) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(@michaelficarra)
See for example this test:
escope/test/es6-destructuring-assignments.coffee
Lines 340 to 346 in f237eef
Note that there are two references with name
c
andisWrite()
true: that is, two write references toc
. This despite the fact thatc
will be written precisely once by the sample code. This is especially confusing if you're looking at const-correctness.Is this intentional? If so, what's the reasoning behind it?
The text was updated successfully, but these errors were encountered: