mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
refactor(transformer): comment about potential improvement to arrow function transform (#5841)
This commit is contained in:
parent
635e9187d3
commit
03e02a0eac
1 changed files with 4 additions and 0 deletions
|
|
@ -246,6 +246,10 @@ impl<'a> ArrowFunctions<'a> {
|
|||
span: Span,
|
||||
ctx: &mut TraverseCtx<'a>,
|
||||
) -> IdentifierReference<'a> {
|
||||
// TODO(improve-on-babel): We create a new UID for every scope. This is pointless, as only one
|
||||
// `this` can be in scope at a time. We could create a single `_this` UID and reuse it in each
|
||||
// scope. But this does not match output for some of Babel's test cases.
|
||||
// <https://github.com/oxc-project/oxc/pull/5840>
|
||||
let this_var = self.this_var_stack.last_mut().unwrap();
|
||||
if this_var.is_none() {
|
||||
let target_scope_id =
|
||||
|
|
|
|||
Loading…
Reference in a new issue