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:
Boshen authored and GitHub committed 2026-10-30 11:36:53 +08:00
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;