forked from python/mypy
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't crash on unsupported Python 3.10 match statement (python#11738)
Generate a syntax error instead.
- Loading branch information
1 parent
2b5abba
commit 7afeccf
Showing
3 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[case testMatchStatementNotSupported] | ||
# flags: --python-version 3.10 | ||
match str(): # E: Match statement is not supported | ||
case 'x': | ||
1 + '' | ||
case _: | ||
1 + b'' |