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(parser) Throw syntax error when const not inititialized in strict mode #3742

Merged
merged 12 commits into from Feb 27, 2022

Conversation

williamtetlow
Copy link
Contributor

Description:
fixes: #3730

Throw syntax error when const not initialized for Ecmascript and Typescript

BREAKING CHANGE:

Related issue (if exists):
#3730

@williamtetlow williamtetlow marked this pull request as draft February 25, 2022 18:50
@williamtetlow williamtetlow marked this pull request as ready for review February 25, 2022 19:31
@williamtetlow williamtetlow changed the title Throw syntax error when const not inititialized in strict mode fix(parser) Throw syntax error when const not inititialized in strict mode Feb 25, 2022
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thank you!

crates/swc_ecma_parser/src/parser/stmt.rs Outdated Show resolved Hide resolved
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thank you!

crates/swc_ecma_parser/src/parser/stmt.rs Outdated Show resolved Hide resolved
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thank you!

crates/swc/tests/simple.rs Outdated Show resolved Hide resolved
kdy1
kdy1 previously approved these changes Feb 26, 2022
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Thank you!


swc-bump:

  • swc_ecma_parser

@kdy1 kdy1 enabled auto-merge (squash) February 26, 2022 13:41
@kdy1 kdy1 added this to the v1.2.146 milestone Feb 26, 2022
@kdy1 kdy1 disabled auto-merge February 27, 2022 05:11
@kdy1 kdy1 merged commit abc0572 into swc-project:main Feb 27, 2022
@swc-project swc-project locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

SWC doesn't enforce (TS1155): 'const' declarations must be initialized.
3 participants