mirror of
				https://github.com/astral-sh/ruff.git
				synced 2025-10-30 19:47:52 +00: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:
		
							parent
							
								
									c424007645
								
							
						
					
					
						commit
						c7e2bfd759
					
				
					 3 changed files with 130 additions and 1 deletions
				
			
		|  | @ -2787,7 +2787,7 @@ impl SemanticSyntaxContext for SemanticIndexBuilder<'_, '_> { | |||
|     } | ||||
| 
 | ||||
|     fn in_loop_context(&self) -> bool { | ||||
|         true | ||||
|         self.current_scope_info().current_loop.is_some() | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alex Waygood
						Alex Waygood