Skip to content

[compiler] Fix for inferring props-derived-value as mutable#35140

Merged
josephsavona merged 2 commits into
mainfrom
pr35140
Nov 14, 2025
Merged

[compiler] Fix for inferring props-derived-value as mutable#35140
josephsavona merged 2 commits into
mainfrom
pr35140

Conversation

@josephsavona

@josephsavona josephsavona commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

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.


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.
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.
josephsavona added a commit that referenced this pull request Nov 14, 2025
…props (#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).
* #35140
* __->__ #35139
@josephsavona josephsavona merged commit 19b769f into main Nov 14, 2025
23 of 24 checks passed
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