From 3396b693791eb12419a93a898fc6ab73e75e85a3 Mon Sep 17 00:00:00 2001 From: overlookmotel <557937+overlookmotel@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:16:22 +0000 Subject: [PATCH] refactor(transformer/exponentiation-operator): correct comment (#7476) Follow-on after #7410. Update comment to reflect the changed logic. --- crates/oxc_transformer/src/es2016/exponentiation_operator.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/oxc_transformer/src/es2016/exponentiation_operator.rs b/crates/oxc_transformer/src/es2016/exponentiation_operator.rs index dd67af39a82c6..f95d4a9a571a0 100644 --- a/crates/oxc_transformer/src/es2016/exponentiation_operator.rs +++ b/crates/oxc_transformer/src/es2016/exponentiation_operator.rs @@ -157,7 +157,7 @@ impl<'a, 'ctx> ExponentiationOperator<'a, 'ctx> { let reference = ctx.scoping.symbols_mut().get_reference_mut(ident.reference_id()); // `left **= right` is being transformed to `left = Math.pow(left, right)`, - // so if `left` is no longer being read from, update its `ReferenceFlags`. + // so `left` in `left =` is no longer being read from *reference.flags_mut() = ReferenceFlags::Write; let pow_left = if let Some(symbol_id) = reference.symbol_id() {