-
Notifications
You must be signed in to change notification settings - Fork 12.8k
fix(37791): Using object destructuring with ECMAScript's private field as computed property name leads to runtime error #38135
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
Conversation
9cbd4c8
to
667e845
Compare
@typescript-bot pack this |
I don't think this sufficiently resolves the issue. There are two different problems here that need to be addressed:
class Foo {
#value;
constructor(value) {
this.#value = value;
}
getValue(data) {
const obj = this;
class Bar {
#y;
[obj.#value]() {}
}
return value;
}
} I think the problem with (1) is in
This should probably read: expressions.push(node.expression); Because
Removing |
667e845
to
680c83d
Compare
@rbuckton Thanks for the review 👍🏻. I've added additional changes/tests. |
680c83d
to
99dabe9
Compare
99dabe9
to
83416ae
Compare
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.
Looks good!
@rbuckton Thanks |
Fixes #37791