dillon1000/react

Commit

Fix scope merging in MergeOverlappingReactiveScopes

When `MergeOverlappingReactiveScopes` identified scopes to be merged, it was 
currently (oops, my bad) updating the _existing_ scope's id and range. Later, 
PropagateScopeDependencies marks outputs of a scope by updating that 
identifier's scope instance — so if that scope instance isn't shared, then the 
output is lost. This PR fixes MergeOverlappingReactiveScopes to correctly update 
all operands for a scope to have the same scope instance.
Browse files
Changed paths6 files
First-parent comparison
M compiler/forget/src/ReactiveScopes/MergeOverlappingReactiveScopes.ts ModifiedM compiler/forget/src/__tests__/fixtures/hir/chained-assignment-expressions.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/conditional-on-mutable.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/independent-across-if.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…