fix(plugin-proposal-function-bind): fix invalid code emitted for ::super.foo (#12000)

This commit is contained in:
uhyo
2020-08-25 02:35:31 +09:00
committed by GitHub
parent 941f610275
commit 76d571e285
3 changed files with 17 additions and 1 deletions

View File

@@ -15,7 +15,10 @@ export default declare(api => {
function getStaticContext(bind, scope) {
const object = bind.object || bind.callee.object;
return scope.isStatic(object) && object;
return (
scope.isStatic(object) &&
(t.isSuper(object) ? t.thisExpression() : object)
);
}
function inferBindContext(bind, scope) {