diff --git a/crates/oxc_transformer/src/es2022/class_properties/private_method.rs b/crates/oxc_transformer/src/es2022/class_properties/private_method.rs index 6452a18e742f7..f1735ae6e6db6 100644 --- a/crates/oxc_transformer/src/es2022/class_properties/private_method.rs +++ b/crates/oxc_transformer/src/es2022/class_properties/private_method.rs @@ -160,5 +160,12 @@ impl<'a> VisitMut<'a> for PrivateMethodVisitor<'a, '_, '_> { #[inline] fn visit_class(&mut self, _class: &mut Class<'a>) { // Ignore because we don't need to transform `super` for other classes. + + // TODO: Actually we do need to transform `super` in: + // 1. Class decorators + // 2. Class `extends` clause + // 3. Class property/method/accessor computed keys + // 4. Class property/method/accessor decorators + // (or does `super` in a decorator refer to inner class?) } } diff --git a/crates/oxc_transformer/src/es2022/class_properties/static_block_and_prop_init.rs b/crates/oxc_transformer/src/es2022/class_properties/static_block_and_prop_init.rs index 49fbc8c979823..57fbd83845262 100644 --- a/crates/oxc_transformer/src/es2022/class_properties/static_block_and_prop_init.rs +++ b/crates/oxc_transformer/src/es2022/class_properties/static_block_and_prop_init.rs @@ -365,6 +365,8 @@ impl<'a> VisitMut<'a> for StaticVisitor<'a, '_, '_> { self.reparent_scope_if_first_level(&class.scope_id); + // TODO: Need to visit decorators *before* incrementing `scope_depth`. + // Decorators could contain scopes. e.g. `@(() => {}) class C {}` self.scope_depth += 1; walk_mut::walk_class(self, class); self.scope_depth -= 1;