dillon1000/react

Commit

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).
Browse files
Changed paths2 files
First-parent comparison
M compiler/forget/src/SSA/LeaveSSA.ts ModifiedM compiler/forget/src/__tests__/fixtures/compiler/error.while-with-assignment-in-test.expect.md Modified
Patch

Files changed

Rendering syntax-highlighted changes…