[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
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
}