Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix compilation of nested
super(...)
calls (#14709)
- Loading branch information
Showing
3 changed files
with
24 additions
and
3 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
5 changes: 5 additions & 0 deletions
5
packages/babel-plugin-transform-classes/test/fixtures/regression/14652/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,5 @@ | ||
class C extends P { | ||
constructor() { | ||
super(super(super())) | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/babel-plugin-transform-classes/test/fixtures/regression/14652/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,16 @@ | ||
var C = /*#__PURE__*/function (_P) { | ||
"use strict"; | ||
|
||
babelHelpers.inherits(C, _P); | ||
|
||
var _super = babelHelpers.createSuper(C); | ||
|
||
function C() { | ||
var _this; | ||
|
||
babelHelpers.classCallCheck(this, C); | ||
return _super.call(this, _this = _super.call(this, _this = _super.call(this))); | ||
} | ||
|
||
return babelHelpers.createClass(C); | ||
}(P); |