mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(semantic/cfg): issue in unlabeled Ctxs. (#3678)
[oxlint-ecosystem-ci](https://github.com/rzvxa/oxlint-ecosystem-ci/actions/runs/9519079285)
This commit is contained in:
parent
eff9cff048
commit
7a58fec6b5
1 changed files with 6 additions and 1 deletions
|
|
@ -240,7 +240,12 @@ impl<'a> ControlFlowGraphBuilder<'a> {
|
|||
.filter(|it| it.flags.contains(flag))
|
||||
.find(|it| it.is(label))
|
||||
} else {
|
||||
self.ctx_stack.iter_mut().rev().find(|it| it.flags.contains(flag))
|
||||
self.ctx_stack
|
||||
.iter_mut()
|
||||
.rev()
|
||||
// anything up the function is unreachable
|
||||
.take_while(|it| !it.flags.intersects(CtxFlags::FUNCTION))
|
||||
.find(|it| it.flags.contains(flag))
|
||||
};
|
||||
|
||||
if let Some(ctx) = ctx {
|
||||
|
|
|
|||
Loading…
Reference in a new issue