Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Typed WeakMap receivers ignore own get, setPrototypeOf and a patched WeakMap.prototype.get

Open
#12,669 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
compilers

Research direction

The typed WeakMap dispatch lives in Perry's codegen, so start by finding where it emits direct calls to the builtin WeakMap get and has, and where the js_bm_* entries perform their pristine-prototype and plain-receiver checks. Reproduce by compiling a small TypeScript file that adds an own get, relinks the receiver with Object.setPrototypeOf, or patches WeakMap.prototype.get, and compare against node. Done means those cases fall back to the generic path and the Promise has() case throws a TypeError like node.

Written by the indexing model from the issue text.

Description

Found by the step 5 phase 2 lane; main has it too. Codegen's typed WeakMap dispatch calls the builtin directly even when the receiver has an own get, was relinked with Object.setPrototypeOf, or WeakMap.prototype.get was replaced. Related: has() called on a Promise through an untyped receiver doesn't throw (node throws TypeError). The typed dispatch needs the same pristine-prototype and plain-receiver proof as the new js_bm_* entries.

Dominant language
Rust
Stars
4.9k
Forks
166
Avg merge
3h 23m
Merged PRs (30d)
911

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PerryTS/perry

All issues in PerryTS/perry

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.