-
Notifications
You must be signed in to change notification settings - Fork 471
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
Remove SM staging tests wrongly testing invalid LHS #4345
base: main
Are you sure you want to change the base?
Conversation
It is an early error if the LHS of: - ForOfStatement - UpdateExpression - AssignmentExpression - DestructuringAssignmentTarget is not simple (i.e. not a function call).
cc @dminor since at least one of these is marked as a regression test |
I'll deal with these next week |
The spec is wrong here: tc39/ecma262#2193 |
These tests can be added once the spec is updated. We cannot have tests for something that has never even been presented in plenary, and even if we did then we'd need to have them with the appropriate feature flag and not mixing the feature with other unrelated assertions (in the |
I’m not sure that level of rigor needs to hold for the staging directory. |
@ljharb I agree that there doesn't need to be much rigor to merge tests in the staging directory. However, it should be possible to fix them when needed. The goal of the staging directory is for implementations to be able to share tests with each other before that they are "good enough" to be merged in the main test262 corpus. In this case we have already two consumers of test262 that correctly implement the spec and stumbled upon problems with the tests touched by this PR, because they are not what the spec asks us to implement. Once somebody reports that a test is wrong, the test should be removed or fixed. This is the staging process working! The wrong test doesn't need to be caught by review of test262 maintainers, but it can be reviewed asynchronously by other implementations after that it is merged. In this specific case, there is an open PR in the ecma262 repo that would make some of the wrong tests in this PR (but not the for-of one) correct. That PR has not even been presented to the committee yet, and looking at the comments in that PR there is no agreement on what the change should be: it's simply not possible to write tests for it yet. However, given that the tests exist and maybe one day the spec will actually match what these tests say, we could add a feature flag like EDIT: This was found by Babel and Porffor while running the updated tests, but it seems like they are not the only ones not passing it: |
It is an early error if the LHS of: