[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
This commit is contained in:
Joe Savona
2024-06-12 16:56:22 -07:00
parent d9a5b6393a
commit ca9b6a7ebc

View File

@@ -856,7 +856,7 @@ export function mapTerminalSuccessors(
const block = fn(terminal.block);
const fallthrough = fn(terminal.fallthrough);
return {
kind: "scope",
kind: terminal.kind,
scope: terminal.scope,
block,
fallthrough,