[ty] name is parameter and global is a syntax error (#21312)

Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
This commit is contained in:
Bhuminjay Soni 2025-11-14 23:45:34 +05:30 committed by GitHub
parent 8599c7e5b3
commit 8529d79a70
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 194 additions and 18 deletions

View file

@ -2107,8 +2107,10 @@ pub trait SemanticSyntaxContext {
fn report_semantic_error(&self, error: SemanticSyntaxError);
/// Returns `true` if the visitor is inside a `for` or `while` loop.
fn in_loop_context(&self) -> bool;
/// Returns `true` if `name` is a bound parameter in the current function or lambda scope.
fn is_bound_parameter(&self, name: &str) -> bool;
}