-
-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(transformer): arrow function transform handle
this
in arrow fun…
…ction in class static block (#5848) Class static blocks also hold a `this` binding.
- Loading branch information
1 parent
bcdbba3
commit 49ee1dc
Showing
6 changed files
with
57 additions
and
4 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
commit: 3bcfee23 | ||
|
||
Passed: 43/53 | ||
Passed: 44/54 | ||
|
||
# All Passed: | ||
* babel-plugin-transform-nullish-coalescing-operator | ||
|
6 changes: 6 additions & 0 deletions
6
...babel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-static-block/input.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
let f; | ||
class C { | ||
static { | ||
f = () => this; | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...abel-plugin-transform-arrow-functions/test/fixtures/arrow-in-class-static-block/output.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let f; | ||
class C { | ||
static { | ||
var _this = this; | ||
f = function() { | ||
return _this; | ||
}; | ||
} | ||
} |