mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
fix(semantic): stop let-binding scans at arrow functions (#28444)
Stop lexical-declaration ancestry checks at arrow-function boundaries so a sloppy arrow parameter named `let` is accepted. Validated with scoped Rust checks, full conformance, parser bindings. AI-assisted (Codex).
This commit is contained in:
1 parent
342151609b
commit
fc0eed3404
2 files changed
+5
-1
No files matched your search
@@ -276,7 +276,7 @@ pub fn check_binding_identifier(ident: &BindingIdentifier, ctx: &SemanticBuilder
|
||||
}
|
||||
break;
|
||||
}
|
||||
AstKind::Function(_) => break,
|
||||
AstKind::Function(_) | AstKind::ArrowFunctionExpression(_) => break,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
const first = let => let;
|
||||
let second = (let) => let;
|
||||
const third = ({ let }) => let;
|
||||
const fourth = (...let) => let;
|
||||
Reference in new issue
Block a user