fix(javascript): retain initialized class self binding at body reads

This commit is contained in:
morluto
2026-10-24 03:10:43 +08:00
parent f1a9d85de5
commit dd55e2c7d5
2 changed files with 42 additions and 0 deletions
@@ -211,3 +211,8 @@ it("owns a class declaration's self reference separately from its outer variable
)?.resolution,
).toBe("exact");
});
it("does not initialize a class self name during computed-key evaluation", () => {
const ir = analyze(`class Service { [Service()]() {} }`, "fixture.mjs");
expect(ir.callSites[0]?.resolution).not.toBe("exact");
});