summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2023-10-17 12:45:13 (GMT)
committerGitHub <noreply@github.com>2023-10-17 12:45:13 (GMT)
commit24e4ec7766fd471deb5b7e5087f0e7dba8576cfb (patch)
tree76530df6f2e24de8c9c016476cbe0026bae90505 /Lib
parentbe5e8a010341c4d2d28ef53a1baed402ee06466e (diff)
downloadcpython-24e4ec7766fd471deb5b7e5087f0e7dba8576cfb.zip
cpython-24e4ec7766fd471deb5b7e5087f0e7dba8576cfb.tar.gz
cpython-24e4ec7766fd471deb5b7e5087f0e7dba8576cfb.tar.bz2
gh-110938: Fix error messages for indented blocks with functions and classes with generic type parameters (#110973)
Diffstat (limited to 'Lib')
-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 52fc357..f5cf966 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):