Skip to content

Fix class heritage, class static members, and static-block this parity - #3568

Open
ctate wants to merge 8 commits into
mainfrom
ctate/fix-class-heritage-f81725
Open

ctate wants to merge 8 commits into
mainfrom
ctate/fix-class-heritage-f81725

Conversation

@ctate

@ctate ctate commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator
  • Lower computed class heritage expressions and generic bases whose type argument is any, including defaulted arguments and JSDoc forms.
  • Carry a function-local class's static members on its class value, read that value's static fields and accessors through any, Reflect.get and Object.getOwnPropertyDescriptor, and construct directly through a mixin result binding.
  • Treat this in a class static block as the class constructor, so this.prototype.x and this.staticField run as in Node, and keep a named diagnostic only for shapes the static model cannot represent.

@vercel

vercel Bot commented Nov 12, 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 Nov 13, 2026 1:44am UTC

@vercel-internal-security-reviewer

Copy link
Copy Markdown

Security review details

Comment on lines +7268 to +7272
mine?.kind === "classval" &&
theirs?.kind === "classval" &&
mine.className !== theirs.className &&
!lowerer.isSubclassOf(mine.className, theirs.className) &&
!lowerer.isSubclassOf(theirs.className, mine.className)

@vercel vercel Bot Nov 12, 2026 •

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.

A nested conditional heritage still hides its leaf subclass behind the inner expression’s common base type, bypassing the guard and dropping the selected subclass’s initialization and overrides.

Fix on Vercel

This branch was successfully deployed

1 active deployment
Preview — 7e81153e Deployed Nov 13, 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