-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(es/compat): Init this in sub class constructor for async
- Loading branch information
Showing
4 changed files
with
167 additions
and
11 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
15 changes: 15 additions & 0 deletions
15
...ransforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/issue_8452.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,15 @@ | ||
class Test0 { | ||
} | ||
class Test extends Test0 { | ||
constructor(){ | ||
var _this; | ||
super(), _this = this, console.log(function() { | ||
var _ref = _async_to_generator(function*(e) { | ||
yield _this.test(); | ||
}); | ||
return function(e) { | ||
return _ref.apply(this, arguments); | ||
}; | ||
}()); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...ransforms_compat/tests/__swc_snapshots__/tests/es2017_async_to_generator.rs/issue_9432.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,10 @@ | ||
class Foo extends Bar { | ||
constructor(options){ | ||
var _this; | ||
super({ | ||
callA: _async_to_generator(function*() { | ||
_this.callA(); | ||
}) | ||
}), _this = this; | ||
} | ||
} |
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