dillon1000/react

Commit

[facepalm] Fix bug w missing deps

While reviewing @poteto's PR I noticed that there were some cases of missing 
dependencies. I tracked it down to a bug I introduced 
[here](https://github.com/facebook/react-forget/commit/5b827eb85ce0b09a72e620449d1d676071c2e0b9#r100646304). 
Decl.id is meant to be the id of the instruction that declares the variable. We 
then test to see if a dependency is later than that. If the Decl.id is 
incorrectly too high, then we miss some dependencies thinking they aren't 
defined yet.
Browse files
Changed paths6 files
First-parent comparison
M compiler/forget/src/ReactiveScopes/PropagateScopeDependencies.ts ModifiedM compiler/forget/src/__tests__/fixtures/hir/reassignment-conditional.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/reassignment-separate-scopes.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/ssa-leave-case.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/switch-non-final-default.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/switch.expect.md Modified
Patch

Files changed

Rendering syntax-highlighted changes…