-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
super is not working inside methods marked async (T6895) #3930
Copy link
Copy link
Closed
Labels
Has PRoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
Issue originally made by Dmitriy Krasnikov (dmitriy.krasnikov)
Bug information
- Babel version: 6.3.26
- Node version: 5.3
- npm version: 3.3.12
Options
{
plugins:[
"transform-async-to-generator",
]
}
Input code
export class BaseClass {
async test(id){
console.log(id);
}
}
export class ChildClass extends BaseClass{
async test(id){
id=1;
super.test(id);
}
}
let cls = new ChildClass();
cls.test(5);Description
Outputs:
export class BaseClass {
test(id) {
return _asyncToGenerator(function* () {
console.log(id);
})();
}
}
export class ChildClass extends BaseClass {
test(id) {
return _asyncToGenerator(function* () {
id = 1;
super.test(id);
})();
}
}
let cls = new ChildClass();
cls.test(5);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Has PRoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue