dillon1000/react

Commit

Repro for bug with memo vars at wrong block scope

Minimal(ish) repro of a bug we saw internally, where an output of a nested 
reactive scope is defined at the wrong block scope, and so later references to 
that value are invalid. 

The simplified structure is: 

``` 

scope0 inputs=[] outputs=[] { 

scope1 inputs=[] outputs=[t0] { 

t0 = ... 

} 

} 

t0 

``` 

Note that `t0` correctly appears as an output of the inner scope1, but not as an 
output of the outer scope0. We need to propagate outputs upward as necessary to 
ensure they are available at the right block scope: in this case, that would add 
`t0` as an output of scope0. 

An earlier version of PropagateScopeDependencies did this but it looks like it 
got lost along the way (not a big deal)
Browse files
Changed paths4 files
First-parent comparison
A compiler/forget/src/__tests__/fixtures/compiler/_bug.inner-memo-value-not-promoted-to-outer-scope-dynamic.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/_bug.inner-memo-value-not-promoted-to-outer-scope-dynamic.js AddedA compiler/forget/src/__tests__/fixtures/compiler/_bug.inner-memo-value-not-promoted-to-outer-scope-static.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/_bug.inner-memo-value-not-promoted-to-outer-scope-static.js Added
Patch

Files changed

Rendering syntax-highlighted changes…