Add a [`SemanticSyntaxErrorKind::ReboundComprehensionVariable`] if `expr` rebinds an iteration variable in `generators`.
(
expr: &Expr,
comprehensions: &[ast::Comprehension],
ctx: &Ctx,
)
| 1193 | /// Add a [`SemanticSyntaxErrorKind::ReboundComprehensionVariable`] if `expr` rebinds an |
| 1194 | /// iteration variable in `generators`. |
| 1195 | fn check_generator_expr<Ctx: SemanticSyntaxContext>( |
| 1196 | expr: &Expr, |
| 1197 | comprehensions: &[ast::Comprehension], |
| 1198 | ctx: &Ctx, |
| 1199 | ) { |
| 1200 | Self::check_rebound_variables( |
| 1201 | expr, |
| 1202 | comprehension_target_names(comprehensions), |
| 1203 | FxHashSet::default(), |
| 1204 | ctx, |
| 1205 | ); |
| 1206 | Self::check_class_body_expr(expr, ctx); |
| 1207 | } |
| 1208 | |
| 1209 | fn check_generator_clauses<Ctx: SemanticSyntaxContext>( |
| 1210 | generators: &[ast::Comprehension], |
nothing calls this directly
no test coverage detected