Skip to content

Commit

Permalink
refactor(semantic): remove resetting current_reference_flags in vis…
Browse files Browse the repository at this point in the history
…it functions (#7986)

We have reset current_reference_flags after resolving reference flags in #7923, so that we don't need to set it to empty in another place.
  • Loading branch information
Dunqing committed Dec 18, 2024
1 parent 3250a47 commit 48cb52b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions crates/oxc_semantic/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -854,8 +854,6 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> {

self.visit_assignment_target(&expr.left);

self.current_reference_flags = ReferenceFlags::empty();

/* cfg */
let cfg_ixs = control_flow!(self, |cfg| {
if expr.operator.is_logical() {
Expand Down Expand Up @@ -1764,7 +1762,6 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> {
// ^ ^ We always treat `a` as Read and Write reference,
self.current_reference_flags = ReferenceFlags::read_write();
self.visit_simple_assignment_target(&it.argument);
self.current_reference_flags = ReferenceFlags::empty();
self.leave_node(kind);
}

Expand Down

0 comments on commit 48cb52b

Please sign in to comment.