Skip to content

Commit

Permalink
Regression test for match variable inside match (#3993)
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra authored Oct 28, 2023
1 parent 9a90fa2 commit 5edd993
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/data/cases/pattern_matching_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,9 @@
match (X.type, Y):
case _:
pass
# issue 3487
match = re.match(r"(?P<grade>LD|MD|HD)(?P<material>AL|SS)", "HDSS")

match (match.group("grade"), match.group("material")):
case ("MD" | "HD", "SS" as code):
print("You will get here")

0 comments on commit 5edd993

Please sign in to comment.