dillon1000/react
Commit
Browse files 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.
Changed paths5 files
First-parent comparisoncompiler/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 ModifiedPatch
Files changed
Rendering syntax-highlighted changes…