Skip to content

Commit

Permalink
Fix match subject ignoring redefinitions
Browse files Browse the repository at this point in the history
Fixes #14746
  • Loading branch information
VincentVanlaer committed May 25, 2023
1 parent b8dd40e commit 28ffa97
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mypy/renaming.py
Expand Up @@ -182,6 +182,7 @@ def visit_assignment_stmt(self, s: AssignmentStmt) -> None:
self.analyze_lvalue(lvalue)

def visit_match_stmt(self, s: MatchStmt) -> None:
s.subject.accept(self)
for i in range(len(s.patterns)):
with self.enter_block():
s.patterns[i].accept(self)
Expand Down

0 comments on commit 28ffa97

Please sign in to comment.