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: change some walk_block_statement to walk_statement #7410

Merged
merged 5 commits into from
Aug 2, 2024

Conversation

CPunisher
Copy link
Contributor

@CPunisher CPunisher commented Aug 1, 2024

Summary

webpack only directly call walkBlockStatement at walkStatement and walkClass(StaticBlock).

The difference between calling directly and calling via walk_statement is that walk_statement updates the statement_path and prev_statement in enter_statement.

Omitting to update prev_statement results in asi_safe error, which causes an unexpected semicolon to be inserted after the comma in the SequentialStatement.

closes #7397

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Aug 1, 2024

Deploy Preview for rspack ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit f961343
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/66ab7cb5efeb770007fd571f
😎 Deploy Preview https://deploy-preview-7410--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions github-actions bot added the release: bug fix release: bug related release(mr only) label Aug 1, 2024
@CPunisher CPunisher changed the title fix: walk constructor's body with walk_statement fix: change all walk_block_statement to walk_statement Aug 1, 2024
@CPunisher CPunisher changed the title fix: change all walk_block_statement to walk_statement fix: change some walk_block_statement to walk_statement Aug 1, 2024
@CPunisher CPunisher marked this pull request as ready for review August 1, 2024 12:12
Copy link
Contributor

@h-a-n-a h-a-n-a left a comment

Choose a reason for hiding this comment

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

Thanks

@h-a-n-a h-a-n-a merged commit 71077b4 into web-infra-dev:main Aug 2, 2024
28 checks passed
@chenjiahan chenjiahan mentioned this pull request Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: bug fix release: bug related release(mr only)
Projects
None yet
2 participants