summaryrefslogtreecommitdiff
path: root/pyflakes/test/test_match.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyflakes/test/test_match.py')
-rw-r--r--pyflakes/test/test_match.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pyflakes/test/test_match.py b/pyflakes/test/test_match.py
index 89826e3..b237523 100644
--- a/pyflakes/test/test_match.py
+++ b/pyflakes/test/test_match.py
@@ -81,3 +81,14 @@ class TestMatch(TestCase):
case {'foo': k1, **rest}:
print(f'{k1=} {rest=}')
''')
+
+ def test_defined_in_different_branches(self):
+ self.flakes('''
+ def f(x):
+ match x:
+ case 1:
+ def y(): pass
+ case _:
+ def y(): print(1)
+ return y
+ ''')