-
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
Destructuring results in invalid write reference #68
Comments
Yeah, it is by design. escope makes writable-references for variable-initializers. So the Please see also #65. |
@mysticatea Thank you for responding, given your description of init and partial I would be able to implement the changes in behaviour. Partial doesn't seem to be operating in the fashion you mention, here are the results for partial and init in two different circumstances;
|
On
On |
I may be wrong but I don't think this is incorrect according to the draft. My interpretation of the draft is that it creates a reference from the assignment expression, then declares the value with rhs destructuring if available and if not uses the default value on the assignment expression. This makes sense because if it didn't you are declaring
|
Given the following code;
The result is two write declarations on variable
x
the first to10
and the second to the empty object{}
The text was updated successfully, but these errors were encountered: