Files
openide/python/testData/inspections/PyUnboundLocalVariableInspection/OrPatternAlternativesDefineDifferentNames.py
2021-10-18 13:57:02 +00:00

4 lines
351 B
Python

def func(x):
match x:
case <error descr="Pattern does not bind name z">[1, y]</error> | <error descr="Pattern does not bind name y">[2, z]</error>:
print(<warning descr="Local variable 'y' might be referenced before assignment">y</warning>, <warning descr="Local variable 'z' might be referenced before assignment">z</warning>)