-
-
Notifications
You must be signed in to change notification settings - Fork 483
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(transformer/class-properties): fix symbol clashes in instance pro…
…p initializers (#7872) Instance property initializers are moved into constructor. If symbols they reference are shadowed within constructor, rename those symbols. Input: ```js class C { prop = foo(); constructor(foo) { console.log(foo); } } ``` Output: ```js class C { constructor(_foo) { // <-- renamed this.prop = foo(); // <-- moved into constructor console.log(_foo); // <-- renamed } } ```
- Loading branch information
1 parent
f0a8d8a
commit e76fbb0
Showing
6 changed files
with
227 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.