Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle side effects correctly in rest params index expressions (#4348) (
- Loading branch information
Showing
4 changed files
with
33 additions
and
6 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
4 changes: 4 additions & 0 deletions
4
...bel-plugin-transform-es2015-parameters/test/fixtures/parameters/regression-4348/actual.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,4 @@ | ||
function first(...values) { | ||
var index = 0; | ||
return values[index++]; | ||
} |
6 changes: 6 additions & 0 deletions
6
...l-plugin-transform-es2015-parameters/test/fixtures/parameters/regression-4348/expected.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 @@ | ||
function first() { | ||
var _ref; | ||
|
||
var index = 0; | ||
return _ref = index++ + 0, arguments.length <= _ref ? undefined : arguments[_ref]; | ||
} |
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