JS: Emit variable bindings for 'this' expressions

This commit is contained in:
Asger F
2026-02-27 11:44:54 +01:00
parent f0f58dacb3
commit 0f2de46648
2 changed files with 10 additions and 1 deletions

View File

@@ -1896,6 +1896,15 @@ public class ASTExtractor {
return visit((ThisExpression) nd, c);
}
@Override
public Label visit(ThisExpression nd, Context c) {
Label key = super.visit(nd, c);
if (c.idcontext == IdContext.VAR_BIND || c.idcontext == IdContext.VAR_IN_TYPE_BIND) {
addVariableBinding("bind", key, "this");
}
return key;
}
@Override
public Label visit(JSXMemberExpression nd, Context c) {
Label key = super.visit(nd, c);