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/codegen): Emit question token for class methods #9342

Merged
merged 3 commits into from
Jul 30, 2024

Conversation

dsherret
Copy link
Contributor

I'm in the process of upgrading swc and stumbled on this one.

Description: Regression in emitting class methods that are optional.

Related issue (if exists): None

@dsherret dsherret requested a review from a team as a code owner July 29, 2024 17:02
Copy link

changeset-bot bot commented Jul 29, 2024

🦋 Changeset detected

Latest commit: ff6aa78

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -1599,6 +1599,10 @@ where
}
}

if n.is_optional {
punct!("?");
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this regressed because previously it happened to emit from the binding ident being optional.

Copy link

codspeed-hq bot commented Jul 29, 2024

CodSpeed Performance Report

Merging #9342 will improve performances by 3.39%

Comparing dsherret:fix_es_codegen_method_optional (ff6aa78) with dsherret:fix_es_codegen_method_optional (b0e704b)

Summary

⚡ 1 improvements
✅ 177 untouched benchmarks

Benchmarks breakdown

Benchmark dsherret:fix_es_codegen_method_optional dsherret:fix_es_codegen_method_optional Change
es/full/bugs-1 569 µs 550.4 µs +3.39%

magic-akari
magic-akari previously approved these changes Jul 29, 2024
@kdy1 kdy1 added this to the Planned milestone Jul 30, 2024
@kdy1 kdy1 requested a review from a team as a code owner July 30, 2024 01:36
@kdy1 kdy1 merged commit 636585b into swc-project:main Jul 30, 2024
12 checks passed
@dsherret dsherret deleted the fix_es_codegen_method_optional branch July 30, 2024 01:59
@kdy1 kdy1 modified the milestones: Planned, v1.7.4 Jul 31, 2024
@swc-project swc-project locked as resolved and limited conversation to collaborators Aug 31, 2024
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.

3 participants