dillon1000/react
Commit
Browse files [inference] Capturing an immutable value should be a read
--- Following #1216: If a value is known to be immutable, then it doesn't need to be considered 'captured' since no mutation should occur. Couldn't figure out a unit test in which this specific fix matters, but we need this to fix test output of #1273 cc. @gsathya, would love some feedback / eyes on this. This makes sense for Primitives in particular (which are always read / copied in rval position), but I'm not as familiar with edge cases for other immutable values especially around lambdas.
Changed paths2 files
First-parent comparisoncompiler/forget/src/Inference/InferReferenceEffects.ts ModifiedM compiler/forget/src/__tests__/fixtures/hir/destructure-capture-global.expect.md ModifiedPatch
Files changed
Rendering syntax-highlighted changes…