[ty] Don't warn yield not in function when yield is in function (#18008)

This commit is contained in:
Max Mynter 2025-05-21 18:16:25 +02:00 committed by GitHub
parent d37592175f
commit 02fd48132c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 87 additions and 17 deletions

View file

@ -556,6 +556,10 @@ impl SemanticSyntaxContext for SemanticSyntaxCheckerVisitor<'_> {
true
}
fn in_yield_allowed_context(&self) -> bool {
true
}
fn in_generator_scope(&self) -> bool {
true
}