aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_syntax.py
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2023-10-17 13:45:13 +0100
committerGitHub <noreply@github.com>2023-10-17 13:45:13 +0100
commit24e4ec7766fd471deb5b7e5087f0e7dba8576cfb (patch)
tree76530df6f2e24de8c9c016476cbe0026bae90505 /Lib/test/test_syntax.py
parentbe5e8a010341c4d2d28ef53a1baed402ee06466e (diff)
downloadcpython-24e4ec7766fd471deb5b7e5087f0e7dba8576cfb.tar.gz
cpython-24e4ec7766fd471deb5b7e5087f0e7dba8576cfb.zip
gh-110938: Fix error messages for indented blocks with functions and classes with generic type parameters (#110973)
Diffstat (limited to 'Lib/test/test_syntax.py')
-rw-r--r--Lib/test/test_syntax.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index 52fc3573ddb..f5cf9667d56 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -1446,11 +1446,21 @@ Specialized indentation errors:
Traceback (most recent call last):
IndentationError: expected an indented block after function definition on line 1
+ >>> def foo[T](x, /, y, *, z=2):
+ ... pass
+ Traceback (most recent call last):
+ IndentationError: expected an indented block after function definition on line 1
+
>>> class Blech(A):
... pass
Traceback (most recent call last):
IndentationError: expected an indented block after class definition on line 1
+ >>> class Blech[T](A):
+ ... pass
+ Traceback (most recent call last):
+ IndentationError: expected an indented block after class definition on line 1
+
>>> match something:
... pass
Traceback (most recent call last):