@samitouri / QOS-React-1 / commits / ca9b6a7ebc

[compiler] Fix visitors to emit the correct kind

Our passes aren't sequenced such that we could observe this bug, but this retains the proper terminal kind for pruned-scopes in mapTerminalSuccessors. ghstack-source-id: 1a03b40e45649bbef7d6db968fb2dbd6261a246a Pull Request resolved: https://github.com/facebook/react/pull/29884

Joe Savona committed Jun 12, 2024 at 16:56 UTC ca9b6a7ebc75371c82748e057f55403518ebb5b1
1 file changed +1 -1
compiler/packages/babel-plugin-react-compiler/src/HIR/visitors.ts
+1 -1
@@ -856,7 +856,7 @@ export function mapTerminalSuccessors(
856 const block = fn(terminal.block);
857 const fallthrough = fn(terminal.fallthrough);
858 return {
859 - kind: "scope",
859 + kind: terminal.kind,
860 scope: terminal.scope,
861 block,
862 fallthrough,