(self, expr: IndexExpr)
| 6195 | expr.expr.accept(self) |
| 6196 | |
| 6197 | def visit_index_expr(self, expr: IndexExpr) -> None: |
| 6198 | base = expr.base |
| 6199 | base.accept(self) |
| 6200 | if ( |
| 6201 | isinstance(base, RefExpr) |
| 6202 | and isinstance(base.node, TypeInfo) |
| 6203 | and not base.node.is_generic() |
| 6204 | ): |
| 6205 | expr.index.accept(self) |
| 6206 | elif ( |
| 6207 | isinstance(base, RefExpr) and isinstance(base.node, TypeAlias) |
| 6208 | ) or refers_to_class_or_function(base): |
| 6209 | # We need to do full processing on every iteration, since some type |
| 6210 | # arguments may contain placeholder types. |
| 6211 | self.analyze_type_application(expr) |
| 6212 | else: |
| 6213 | expr.index.accept(self) |
| 6214 | |
| 6215 | def analyze_type_application(self, expr: IndexExpr) -> None: |
| 6216 | """Analyze special form -- type application (either direct or via type aliasing).""" |
nothing calls this directly
no test coverage detected