mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
[3.12] gh-113602: Bail out when the parser tries to override existing errors (GH-113607) (#113652)
gh-113602: Bail out when the parser tries to override existing errors (GH-113607)
(cherry picked from commit 9ed36d533a
)
Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
parent
20631e840e
commit
499f1d0a03
3 changed files with 8 additions and 0 deletions
|
@ -2322,6 +2322,8 @@ func(
|
|||
"""
|
||||
self._check_error(code, "parenthesis '\\)' does not match opening parenthesis '\\['")
|
||||
|
||||
self._check_error("match y:\n case e(e=v,v,", " was never closed")
|
||||
|
||||
# Examples with dencodings
|
||||
s = b'# coding=latin\n(aaaaaaaaaaaaaaaaa\naaaaaaaaaaa\xb5'
|
||||
self._check_error(s, r"'\(' was never closed")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue