mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-40334: Reproduce error message for type comments on bare '*' in the new parser (GH-20151)
This commit is contained in:
parent
d71a6492db
commit
75b863aa97
5 changed files with 55 additions and 23 deletions
|
@ -661,6 +661,7 @@ invalid_parameters:
|
|||
RAISE_SYNTAX_ERROR("non-default argument follows default argument") }
|
||||
invalid_star_etc:
|
||||
| '*' (')' | ',' (')' | '**')) { RAISE_SYNTAX_ERROR("named arguments must follow bare *") }
|
||||
| '*' ',' TYPE_COMMENT { RAISE_SYNTAX_ERROR("bare * has associated type comment") }
|
||||
invalid_lambda_star_etc:
|
||||
| '*' (':' | ',' (':' | '**')) { RAISE_SYNTAX_ERROR("named arguments must follow bare *") }
|
||||
invalid_double_type_comments:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue