diff options
| author | Shantanu <12621235+hauntsaninja@users.noreply.github.com> | 2022-07-18 02:20:12 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-18 10:20:12 +0100 |
| commit | ae0be5a53bb4caee3de4888341addd9c94133f2d (patch) | |
| tree | b6dbf5b251e3ef14eeb30da142e14fa22dbebb60 /Parser/parser.c | |
| parent | 97b4121f9373a1b5312b90ac00eae9960deacfdb (diff) | |
| download | cpython-git-ae0be5a53bb4caee3de4888341addd9c94133f2d.tar.gz | |
gh-94947: Disallow parsing walrus with feature_version < (3, 8) (#94948)
* gh-94947: Disallow parsing walrus with feature_version < (3, 8)
* oops, commit the parser
* 📜🤖 Added by blurb_it.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Diffstat (limited to 'Parser/parser.c')
| -rw-r--r-- | Parser/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/parser.c b/Parser/parser.c index 3d59d4a704..309c249141 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -11223,7 +11223,7 @@ assignment_expression_rule(Parser *p) UNUSED(_end_lineno); // Only used by EXTRA macro int _end_col_offset = _token->end_col_offset; UNUSED(_end_col_offset); // Only used by EXTRA macro - _res = _PyAST_NamedExpr ( CHECK ( expr_ty , _PyPegen_set_expr_context ( p , a , Store ) ) , b , EXTRA ); + _res = CHECK_VERSION ( expr_ty , 8 , "Assignment expressions are" , _PyAST_NamedExpr ( CHECK ( expr_ty , _PyPegen_set_expr_context ( p , a , Store ) ) , b , EXTRA ) ); if (_res == NULL && PyErr_Occurred()) { p->error_indicator = 1; p->level--; |
