Skip to content

[compiler] Repro for false positive mutation of a value derived from props#35139

Merged
josephsavona merged 1 commit into
mainfrom
pr35139
Nov 14, 2025
Merged

[compiler] Repro for false positive mutation of a value derived from props#35139
josephsavona merged 1 commit into
mainfrom
pr35139

Conversation

@josephsavona

@josephsavona josephsavona commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

Repro from the compiler WG (Thanks Cody!) of a case where the compiler incorrectly thinks a value is mutable.


Stack created with Sapling. Best reviewed with ReviewStack.

…props

Repro from the compiler WG (Thanks Cody!) of a case where the compiler incorrectly thinks a value is mutable.
@meta-cla meta-cla Bot added the CLA Signed label Nov 14, 2025
@github-actions github-actions Bot added the React Core Team Opened by a member of the React Core Team label Nov 14, 2025

@poteto poteto left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for looking into this!

@josephsavona josephsavona merged commit dbf2538 into main Nov 14, 2025
23 of 24 checks passed
josephsavona added a commit that referenced this pull request Nov 14, 2025
Fix for the repro from the previous PR. A `Capture x -> y` effect should
downgrade to `ImmutableCapture` when the source value is maybe-frozen.
MaybeFrozen represents the union of a frozen value with a non-frozen
value.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35140).
* __->__ #35140
* #35139
github-actions Bot pushed a commit that referenced this pull request Nov 14, 2025
Fix for the repro from the previous PR. A `Capture x -> y` effect should
downgrade to `ImmutableCapture` when the source value is maybe-frozen.
MaybeFrozen represents the union of a frozen value with a non-frozen
value.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35140).
* __->__ #35140
* #35139

DiffTrain build for [19b769f](19b769f)
github-actions Bot pushed a commit that referenced this pull request Nov 14, 2025
Fix for the repro from the previous PR. A `Capture x -> y` effect should
downgrade to `ImmutableCapture` when the source value is maybe-frozen.
MaybeFrozen represents the union of a frozen value with a non-frozen
value.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35140).
* __->__ #35140
* #35139

DiffTrain build for [19b769f](19b769f)
manNomi pushed a commit to manNomi/react that referenced this pull request Nov 15, 2025
…props (react#35139)

Repro from the compiler WG (Thanks Cody!) of a case where the compiler
incorrectly thinks a value is mutable.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35139).
* react#35140
* __->__ react#35139
manNomi pushed a commit to manNomi/react that referenced this pull request Nov 15, 2025
)

Fix for the repro from the previous PR. A `Capture x -> y` effect should
downgrade to `ImmutableCapture` when the source value is maybe-frozen.
MaybeFrozen represents the union of a frozen value with a non-frozen
value.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/facebook/react/pull/35140).
* __->__ react#35140
* react#35139
unstubbable pushed a commit to vercel/next.js that referenced this pull request Nov 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants