Files
openide/python/testData/highlighting/doubleStarPatternOutsideMappingPattern.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

19 lines
866 B
Python

match 42:
case <error descr="Double star pattern cannot be used outside mapping patterns">**xs</error>:
pass
case (<error descr="Double star pattern cannot be used outside mapping patterns">**xs</error>):
pass
case (<error descr="Double star pattern cannot be used outside mapping patterns">**xs</error>,):
pass
case [<error descr="Double star pattern cannot be used outside mapping patterns">**xs</error>]:
pass
case {'foo': bar, **xs}:
pass
case str(<error descr="Double star pattern cannot be used outside mapping patterns">**xs</error>):
pass
case <error descr="Double star pattern cannot be used outside mapping patterns">**xs</error> as alias:
pass
case [xs] | <error descr="Double star pattern cannot be used outside mapping patterns">**xs</error>:
pass