Skip to content

Commit

Permalink
refactor(transformer/class-properties): correct comments (#7506)
Browse files Browse the repository at this point in the history
Correct comments. I did too much mindless copy-and-paste.
  • Loading branch information
overlookmotel committed Nov 27, 2024
1 parent 053bc08 commit 1c4b29c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions crates/oxc_transformer/src/es2022/class_properties/private.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
ctx: &mut TraverseCtx<'a>,
) {
// Unfortunately no way to make compiler see that these branches are provably unreachable.
// This function is much too large inline, because `transform_static_assignment_expression`
// and `transform_instance_assignment_expression` are inlined into it.
// This function is much too large to inline.
let Expression::CallExpression(call_expr) = expr else { unreachable!() };
let Expression::PrivateFieldExpression(field_expr) = &mut call_expr.callee else {
unreachable!()
Expand Down Expand Up @@ -229,7 +228,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
ctx: &mut TraverseCtx<'a>,
) {
// Unfortunately no way to make compiler see that these branches are provably unreachable.
// This function is much too large inline, because `transform_static_assignment_expression`
// This function is much too large to inline, because `transform_static_assignment_expression`
// and `transform_instance_assignment_expression` are inlined into it.
let Expression::AssignmentExpression(assign_expr) = expr else { unreachable!() };
let AssignmentTarget::PrivateFieldExpression(field_expr) = &mut assign_expr.left else {
Expand Down Expand Up @@ -578,8 +577,7 @@ impl<'a, 'ctx> ClassProperties<'a, 'ctx> {
ctx: &mut TraverseCtx<'a>,
) {
// Unfortunately no way to make compiler see that these branches are provably unreachable.
// This function is much too large inline, because `transform_static_assignment_expression`
// and `transform_instance_assignment_expression` are inlined into it.
// This function is much too large to inline.
let Expression::UpdateExpression(update_expr) = expr else { unreachable!() };
let field_expr = match &mut update_expr.argument {
SimpleAssignmentTarget::PrivateFieldExpression(field_expr) => field_expr.as_mut(),
Expand Down

0 comments on commit 1c4b29c

Please sign in to comment.