Files
openide/python/testData/highlighting/orPatternAlternativesBindDifferentNames.py
Mikhail Golubev e9d11d1215 PY-48010 Warn about problems causing SyntaxErrors in PEP 634 patterns
GitOrigin-RevId: 718645cc5dfd6d0a14f1bd802f3c5bb2bb2c6074
2021-10-18 13:57:02 +00:00

8 lines
544 B
Python

match 42:
case <error descr="Pattern does not bind name y">[x]</error> | <error descr="Pattern does not bind name x">[y]</error>:
pass
case <error descr="Pattern does not bind name z">[x, y]</error> | <error descr="Pattern does not bind name x">[y, z]</error>:
pass
case <error descr="Pattern does not bind name z">(<error descr="Pattern does not bind name y">[x]</error> | <error descr="Pattern does not bind name x">[y]</error>)</error> | <error descr="Pattern does not bind names x, y">[z]</error>:
pass