| [case testMatchUndefinedSubject] | |
| import typing | |
| match x: | |
| case _: | |
| pass | |
| [out] | |
| main:2: error: Name "x" is not defined | |
| [case testMatchUndefinedValuePattern] | |
| import typing | |
| x = 1 | |
| match x: | |
| case a.b: | |
| pass | |
| [out] | |
| main:4: error: Name "a" is not defined | |
| [case testMatchUndefinedClassPattern] | |
| import typing | |
| x = 1 | |
| match x: | |
| case A(): | |
| pass | |
| [out] | |
| main:4: error: Name "A" is not defined | |
| [case testNoneBindingWildcardPattern] | |
| import typing | |
| x = 1 | |
| match x: | |
| case _: | |
| _ | |
| [out] | |
| main:5: error: Name "_" is not defined | |
| [case testNoneBindingStarredWildcardPattern] | |
| import typing | |
| x = 1 | |
| match x: | |
| case [*_]: | |
| _ | |
| [out] | |
| main:5: error: Name "_" is not defined |