Skip to content
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 #989 Redeclaration errors should be SyntaxError, not TypeError. #1530

Closed
wants to merge 4 commits into from
Closed

fix #989 Redeclaration errors should be SyntaxError, not TypeError. #1530

wants to merge 4 commits into from

Conversation

tuchida
Copy link
Contributor

@tuchida tuchida commented Jul 19, 2024

Closes #989
I fixed it with 0832dc5. To make it easier to see the improvement, I added tests with f0906a9 and 7dbadd7 in advance. After modification, TypeError was not thrown, so 7dbadd7 was erased with 9fc4e78. Once the review is complete, I will rebase the commits before merging.

@tuchida tuchida changed the title 989/fix redeclaration error fix #989 Redeclaration error is not TypeError but SyntaxError Jul 19, 2024
@tuchida tuchida changed the title fix #989 Redeclaration error is not TypeError but SyntaxError fix #989 Redeclaration errors should be SyntaxError, not TypeError. Jul 19, 2024
@@ -21,7 +21,7 @@ function test()
printBugNumber(BUGNUMBER);
printStatus (summary);

expect = /TypeError: anonymous generator function returns a value/;
expect = /SyntaxError: anonymous generator function returns a value/;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the ECMA specifications, to make the code easier, I also changed the old generator error.

@tuchida tuchida marked this pull request as ready for review July 19, 2024 08:31
@tuchida
Copy link
Contributor Author

tuchida commented Jul 19, 2024

If you merge #1531 first, f0906a9 can be erased.

@gbrail
Copy link
Collaborator

gbrail commented Jul 21, 2024

This is good and I like it. I merged it locally and resolved the test262 conflicts, and I see that indeed all the changes I just merged to test262.properties are intact, so I'm confident that my merge is correct.

Since I did all that and it works, I'm going to close this PR manually and push the changes in a minute.

Thanks for all this work!

@gbrail
Copy link
Collaborator

gbrail commented Jul 21, 2024

Merged manually. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

const [y, y] = [] throws a TypeError, instead of SyntaxError
2 participants