dillon1000/react

Commit

Restrict switch case test values until they use value blocks

We currently lower switch case test values within the wrong scope: the test 
value really should be a value block rather than a `Place`. Until then, this PR 
adds a bailout for complex test values: we allow primitives and identifiers 
which should cover most real-world use-cases.
Browse files
Changed paths5 files
First-parent comparison
M compiler/forget/src/HIR/BuildHIR.ts ModifiedM compiler/forget/src/__tests__/fixtures/hir/error.todo-kitchensink.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/error.todo-kitchensink.js ModifiedM compiler/forget/src/__tests__/fixtures/hir/ssa-switch.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/hir/ssa-switch.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…