Skip to content

fix(runtime): expose prototype for class expression values - #4953

Merged
proggeramlug merged 2 commits into
mainfrom
feat/class-expr-fresh-prototype
Jun 11, 2026
Merged

fix(runtime): expose prototype for class expression values#4953
proggeramlug merged 2 commits into
mainfrom
feat/class-expr-fresh-prototype

Conversation

@TheHypnoo

Copy link
Copy Markdown
Member

Summary

  • Expose a live declared-class prototype object for heap class-expression values (ClassExprFresh) when reading .prototype.
  • Wire Object.defineProperty(ClassExprFresh.prototype, ...) through the same prototype-method side tables used by class-ref prototype writes so instances observe decorator/mixin method updates.
  • Extend node-suite/object/class-prototype-object with getter-capture and method-capture class-expression coverage.
  • Update the NestJS fixture wall document: compat(nestjs): .prototype of a capturing class expression is undefined — tslib __decorate crashes @nestjs/common module init #4949 is resolved, and the fixture now reaches the next decorator descriptor/value wall.

Related issue

Fixes #4949

Test plan

  • cargo build --release -p perry-runtime -p perry-stdlib -p perry
  • ./run_parity_tests.sh --suite node-suite --module object --filter class-prototype
  • ./run_parity_tests.sh --suite node-suite --module object (completed with three pre-existing object-suite mismatches: assign-descriptor-toobject, primitive-wrapper-toobject, reflect-proxy-construct)
  • PERRY_BIN=../../../../target/release/perry ./fixture.sh from tests/release/packages/nestjs-hello (passes the old .prototype === undefined wall and now stops at Cannot read properties of undefined (reading 'value'))

Notes

cargo fmt --all -- --check currently reports unrelated formatting diffs in existing fetch/header files that this PR does not touch.

@proggeramlug
proggeramlug merged commit 9fdcc28 into main Jun 11, 2026
13 checks passed
@proggeramlug
proggeramlug deleted the feat/class-expr-fresh-prototype branch June 11, 2026 03:14
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.

compat(nestjs): .prototype of a capturing class expression is undefined — tslib __decorate crashes @nestjs/common module init

2 participants