[ty] continue and break statements outside loops are syntax errors (#20944)

Co-authored-by: Brent Westbrook <brentrwestbrook@gmail.com>
This commit is contained in:
Alex Waygood 2025-10-17 18:13:40 +01:00 committed by GitHub
parent c424007645
commit c7e2bfd759
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 130 additions and 1 deletions

View file

@ -2787,7 +2787,7 @@ impl SemanticSyntaxContext for SemanticIndexBuilder<'_, '_> {
}
fn in_loop_context(&self) -> bool {
true
self.current_scope_info().current_loop.is_some()
}
}