dillon1000/react

Commit

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).
Browse files
Changed paths3 files
First-parent comparison
M compiler/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 Added
Patch

Files changed

Rendering syntax-highlighted changes…