-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Fix emitted code for variable statement with no bound variables #4657
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
Fix emitted code for variable statement with no bound variables #4657
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you also add a test for assignments,
var a: any;
({} = a);
([] = a);
({}) => { };
([]) => { };There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Does this work for parameters? function f({} = {}) { }
function g([] = []) { } |
|
We have |
|
Actually @JsonFreeman, since the issue was when an identifier appeared in the initializer, that's what we should be testing. I'll amend my tests. |
|
Done. I've added cases in
|
…ngPattern Fix emitted code for variable statement with no bound variables
Fixes #3893.