mirror of
https://github.com/astral-sh/ruff
synced 2026-01-11 08:34:29 -05:00
[ty] continue and break statements outside loops are syntax errors (#20944)
Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
This commit is contained in:
@@ -2787,7 +2787,7 @@ impl SemanticSyntaxContext for SemanticIndexBuilder<'_, '_> {
|
||||
}
|
||||
|
||||
fn in_loop_context(&self) -> bool {
|
||||
true
|
||||
self.current_scope_info().current_loop.is_some()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user