Skip to content

Let an accessor replace a JavaScript class's own field - #4729

Open
ctate wants to merge 8 commits into
canaryfrom
ctate/defineproperty-class-field
Open

ctate wants to merge 8 commits into
canaryfrom
ctate/defineproperty-class-field

Conversation

@ctate

@ctate ctate commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator
  • Object.defineProperty with an accessor descriptor on a JavaScript class's own field now replaces the field, as in Node, instead of throwing Cannot assign to read only property or reading undefined
  • Only fields named by an accessor defineProperty/defineProperties call move to the instance's property bag; other classes keep their layout
  • Adds corpus rows for the subclass and three.js material shapes

@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
scriptc Ready Ready Preview, v0 Dec 5, 2026 10:10pm UTC

Comment on lines +9785 to +9786
const deletedAnswer: IrExpr = (() => {
const prototype = reflectClassPrototype(lowerer, info, loc, receiver);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new prototype lookup makes the existing tracked-field dispatch test access missing mock state, causing the dispatch unit suite to fail.

Fix on Vercel

This branch was successfully deployed

1 active deployment
Preview — c10434ad Deployed Dec 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant