-
Notifications
You must be signed in to change notification settings - Fork 480
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
Delete applied to private name via optional chain #2665
Comments
@leobalter does this fall in scope for the refactoring you wanted to do? |
This is not covered. I did some work on optional chaining but missed covering optional chain as UnaryExpressions. Funny enough, The version with private fields is a SyntaxError regardless of the delete. // valid
class C {
#x = 42;
m() {
var o = this;
return o.#x;
}
}
// SyntaxError
class C {
#x = 42;
m() {
var o = this;
return o?.#x;
}
} We might coverage for private fields + optional chain, but needs verification. |
I don't think that second example is a syntax error since tc39/proposal-class-fields#301 |
Thanks! I was not up to date with the private fields proposal and then we just need to verify coverage. @mgaudet can you help me pointing to the part where |
IIRC, we had tests to cover that |
Is there any further action to take in Test262? |
I think a test case for
SyntaxError
ondelete o?.#x
needs to be added.The text was updated successfully, but these errors were encountered: