diff options
author | Shantanu <12621235+hauntsaninja@users.noreply.github.com> | 2022-07-18 09:20:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-18 09:20:12 (GMT) |
commit | ae0be5a53bb4caee3de4888341addd9c94133f2d (patch) | |
tree | b6dbf5b251e3ef14eeb30da142e14fa22dbebb60 /Parser | |
parent | 97b4121f9373a1b5312b90ac00eae9960deacfdb (diff) | |
download | cpython-ae0be5a53bb4caee3de4888341addd9c94133f2d.zip cpython-ae0be5a53bb4caee3de4888341addd9c94133f2d.tar.gz cpython-ae0be5a53bb4caee3de4888341addd9c94133f2d.tar.bz2 |
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')
-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 3d59d4a..309c249 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--; |