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

This commit is contained in:
morluto committed 2026-10-24 03:10:43 +08:00
1 parent f1a9d85de5
commit dd55e2c7d5
2 files changed
+42

No files matched your search

@@ -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");
});