| 80 | # the PatternTypes of the sub-patterns first. |
| 81 | # Using the data in the PatternType the match subject and captured names can be narrowed/inferred. |
| 82 | class PatternType(NamedTuple): |
| 83 | type: Type # The type the match subject can be narrowed to |
| 84 | rest_type: Type # The remaining type if the pattern didn't match |
| 85 | captures: dict[Expression, Type] # The variables captured by the pattern |
| 86 | |
| 87 | |
| 88 | class PatternChecker(PatternVisitor[PatternType]): |
no outgoing calls
no test coverage detected
searching dependent graphs…