mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 12:19:15 +00:00
fix(ast): correct visited_node attr for strict mode of arrow fns (#3635)
Correct the `#[visited_node]` attr on `ArrowFunctionExpression` to recognise strict mode functions. This change has no effect at present as `Traverse` codegen currently ignores `strict_if`. But useful for it to be correct for if we codegen `Visit` / `VisitMut` later on (#3392).
This commit is contained in:
parent
9698be5479
commit
f8f6d33722
1 changed files with 4 additions and 1 deletions
|
|
@ -2523,7 +2523,10 @@ impl<'a> FunctionBody<'a> {
|
|||
}
|
||||
|
||||
/// Arrow Function Definitions
|
||||
#[visited_node(scope(ScopeFlags::Function | ScopeFlags::Arrow))]
|
||||
#[visited_node(
|
||||
scope(ScopeFlags::Function | ScopeFlags::Arrow),
|
||||
strict_if(self.body.has_use_strict_directive())
|
||||
)]
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "serialize", derive(Serialize, Tsify))]
|
||||
#[cfg_attr(feature = "serialize", serde(tag = "type", rename_all = "camelCase"))]
|
||||
|
|
|
|||
Loading…
Reference in a new issue