dillon1000/react

Commit

[test case] Failing assignment inside of nested if statement

``` 

function useBar(props) { 

let z; 

if (props.a) { 

if (props.b) { 

z = baz(); 

} 

} 

return z; 

} 

``` 

Currently fails with 

``` 

InvariantViolation: A phi cannot have two operands initialized before its 
declaration 

```
Browse files
Changed paths2 files
First-parent comparison
A compiler/forget/src/__tests__/fixtures/hir/error.assignment-in-nested-if.expect.md AddedA compiler/forget/src/__tests__/fixtures/hir/error.assignment-in-nested-if.js Added
Patch

Files changed

Rendering syntax-highlighted changes…