When compiling async functions to generators, super in async methods do not work correctly.
// Options: --async-functions --generators=parse --classes=parse
class B {
m() {
console.log('B-m');
}
}
class C extends B {
async m() {
super.m();
}
}
new C().m();
compiles to:
$traceurRuntime.ModuleStore.getAnonymousModule(function() {
"use strict";
class B {
m() {
console.log('B-m');
}
}
class C extends B {
m() {
return $traceurRuntime.spawn(this, null, function*() {
super.m();
});
}
}
new C().m();
return {};
});
//# sourceURL=traceured.js
which of course does not work.
We need to transform that super.m using the SuperTransformer to:
When compiling async functions to generators, super in async methods do not work correctly.
compiles to:
which of course does not work.
We need to transform that
super.m
using the SuperTransformer to: