dillon1000/react
Commit
Browse files Invariant if codegen tries to emit a temporary as an identifier
For T181507827 — adds an invariant in codegen when emitting identifiers to ensure that we only create babel Identifier nodes for nodes that the compiler has explicitly promoted to valid, named identifiers. This means that we'll fail for unnamed temporaries (previously caught), as well as promoted temporaries that somehow didn't get renamed by RenameVariables (newly caught).
Changed paths3 files
First-parent comparisoncompiler/packages/babel-plugin-react-forget/src/ReactiveScopes/CodegenReactiveFunction.ts ModifiedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.todo-try-catch-within-function-expression.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.todo-try-catch-within-function-expression.js AddedPatch
Files changed
Rendering syntax-highlighted changes…