We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4df840e commit 0478a0bCopy full SHA for 0478a0b
crates/oxc_semantic/src/control_flow/builder/mod.rs
@@ -111,7 +111,9 @@ impl<'a> ControlFlowGraphBuilder<'a> {
111
}
112
113
pub fn add_edge(&mut self, a: BasicBlockId, b: BasicBlockId, weight: EdgeType) {
114
- if self.basic_block(a).unreachable {
+ if matches!(weight, EdgeType::NewFunction) {
115
+ self.basic_block_mut(b).unreachable = false;
116
+ } else if self.basic_block(a).unreachable {
117
if self.graph.edges_directed(b, Direction::Incoming).count() == 0 {
118
self.basic_block_mut(b).unreachable = true;
119
0 commit comments