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