mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
bpo-44180: Report generic syntax errors in the furthest position reached in the first parser pass (GH-26253) (GH-26281)
(cherry picked from commit b51081c1a8)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
parent
f14015adf5
commit
07dba474c5
3 changed files with 10 additions and 1 deletions
|
|
@ -213,6 +213,7 @@ def testSyntaxErrorOffset(self):
|
|||
check('[file for str(file) in []\n])', 2, 2)
|
||||
check('[\nfile\nfor str(file)\nin\n[]\n]', 3, 5)
|
||||
check('[file for\n str(file) in []]', 2, 2)
|
||||
check("ages = {'Alice'=22, 'Bob'=23}", 1, 16)
|
||||
|
||||
# Errors thrown by compile.c
|
||||
check('class foo:return 1', 1, 11)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue