dillon1000/react
Commit
Browse files Fix/review bug repros, mark fixed
I reviewed the test cases we have marked as bugs ("_bug.*") and realized that
several of them are already fixed — woohoo! Then one wasn't fixed _yet_: our
type inference loses track of refs if you stash them inside an object/array. But
that's why I added the ValidateNoRefAccessInRender pass, which i've updated to
detect and reject these invalid cases. There are now only a few bugs left (more
fixes coming).Changed paths12 files
First-parent comparisoncompiler/forget/src/HIR/ValidateNoRefAccesInRender.ts ModifiedD compiler/forget/src/__tests__/fixtures/compiler/_bug.use-ref-added-to-dep-without-type-info.expect.md DeletedR compiler/forget/src/__tests__/fixtures/compiler/_bug.capturing-reference-changes-type.expect.md →compiler/forget/src/__tests__/fixtures/compiler/capturing-reference-changes-type.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/_bug.capturing-reference-changes-type.js →compiler/forget/src/__tests__/fixtures/compiler/capturing-reference-changes-type.js RenamedM compiler/forget/src/__tests__/fixtures/compiler/error.invalid-access-ref-during-render.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/error.invalid-set-and-read-ref-during-render.expect.md ModifiedA compiler/forget/src/__tests__/fixtures/compiler/error.invalid-use-ref-added-to-dep-without-type-info.expect.md AddedR compiler/forget/src/__tests__/fixtures/compiler/_bug.use-ref-added-to-dep-without-type-info.js →compiler/forget/src/__tests__/fixtures/compiler/error.invalid-use-ref-added-to-dep-without-type-info.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/_bug.lambda-reassign-primitive.expect.md →compiler/forget/src/__tests__/fixtures/compiler/lambda-reassign-primitive.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/_bug.lambda-reassign-primitive.js →compiler/forget/src/__tests__/fixtures/compiler/lambda-reassign-primitive.js RenamedR compiler/forget/src/__tests__/fixtures/compiler/_bug.lambda-reassign-shadowed-primitive.expect.md →compiler/forget/src/__tests__/fixtures/compiler/lambda-reassign-shadowed-primitive.expect.md RenamedR compiler/forget/src/__tests__/fixtures/compiler/_bug.lambda-reassign-shadowed-primitive.js →compiler/forget/src/__tests__/fixtures/compiler/lambda-reassign-shadowed-primitive.js RenamedPatch
Files changed
Rendering syntax-highlighted changes…