mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +00:00
gh-130080: do not fold match case constants in unoptimized AST (#131577)
This commit is contained in:
parent
fd459b1153
commit
64906bb223
2 changed files with 15 additions and 0 deletions
|
@ -824,6 +824,9 @@ astfold_withitem(withitem_ty node_, PyArena *ctx_, _PyASTOptimizeState *state)
|
|||
static int
|
||||
fold_const_match_patterns(expr_ty node, PyArena *ctx_, _PyASTOptimizeState *state)
|
||||
{
|
||||
if (state->syntax_check_only) {
|
||||
return 1;
|
||||
}
|
||||
switch (node->kind)
|
||||
{
|
||||
case UnaryOp_kind:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue