dillon1000/react
Commit
Browse files More precise error for canonical reassignment in a value block
These examples previously errored all the way in codegen, when we detected that a value block (eg a `while` test expression) was declaring a new variable. We now detect this in LeaveSSA and error. The actual fix is a bit tricky, we'd need to add a new declaration in the nearest block scope (or selectively not DCE the declaration if its reassigned in just this way).
Changed paths2 files
First-parent comparisoncompiler/forget/src/SSA/LeaveSSA.ts ModifiedM compiler/forget/src/__tests__/fixtures/compiler/error.while-with-assignment-in-test.expect.md ModifiedPatch
Files changed
Rendering syntax-highlighted changes…