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(es/parser): parse decorators after export #7340

Merged
merged 8 commits into from
Apr 29, 2023

Conversation

magic-akari
Copy link
Member

@magic-akari magic-akari commented Apr 27, 2023

Description:

BREAKING CHANGE:

Related issue (if exists):

Verified

This commit was signed with the committer’s verified signature.
mayeut Matthieu Darbois

Verified

This commit was signed with the committer’s verified signature.
mayeut Matthieu Darbois
@magic-akari
Copy link
Member Author

I should put some parser-related test cases, but I'm not sure where to put them.

@magic-akari magic-akari marked this pull request as ready for review April 27, 2023 12:18
@magic-akari
Copy link
Member Author

thread 'errors_tests__typescript_errors__esDecorators__classDeclaration__esDecorators_classDeclaration_exportModifier__file6_ts' panicked at 'assertion failed: `(left == right)`
  left: `
  x Decorators may not appear after `export` or `export default` if they also appear before `export`.
   ,-[$DIR/tests/typescript-errors/esDecorators/classDeclaration/esDecorators-classDeclaration-exportModifier/file6.ts:3:1]
 3 | // error
 4 | @dec export @dec class C6 {}
   :             ^^^^
 4 | 
   `----
`,
 right: `
  x Decorators may not appear after `export` or `export default` if they also appear before `export`.
   ,-[$DIR/tests/typescript-errors/esDecorators/classDeclaration/esDecorators-classDeclaration-exportModifier/file6.ts:3:1]
 3 | // error
 4 | @dec export @dec class C6 {}
   :             ^^^^
   `----
`:

It appears that there is a formatting error present, with an extra 4 added to the line number.

@kdy1 kdy1 added this to the Planned milestone Apr 29, 2023
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) April 29, 2023 11:15
Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

Copy link
Collaborator

@swc-bot swc-bot left a comment

Choose a reason for hiding this comment

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

Automated review comment generated by auto-rebase script

@kdy1 kdy1 disabled auto-merge April 29, 2023 13:25
@kdy1 kdy1 merged commit 985f0ca into swc-project:main Apr 29, 2023
@kdy1 kdy1 modified the milestones: Planned, v1.3.56 Apr 29, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators May 30, 2023
@magic-akari magic-akari deleted the fix/parser-decorators branch September 18, 2023 08:43
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.

legacy decorators with decorate before exports makes bugs
3 participants