Skip to content

Commit 004618f

Browse files
[3.12] gh-110938: More syntax tests for PEP695 funcs and classes (GH-110986) (#111023)
gh-110938: More syntax tests for PEP695 funcs and classes (GH-110986) (cherry picked from commit 220bcc9) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent 2bca5f4 commit 004618f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Lib/test/test_syntax.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,11 +1004,26 @@
10041004
Traceback (most recent call last):
10051005
SyntaxError: expected ':'
10061006
1007+
>>> def f[T]()
1008+
... pass
1009+
Traceback (most recent call last):
1010+
SyntaxError: expected ':'
1011+
10071012
>>> class A
10081013
... pass
10091014
Traceback (most recent call last):
10101015
SyntaxError: expected ':'
10111016
1017+
>>> class A[T]
1018+
... pass
1019+
Traceback (most recent call last):
1020+
SyntaxError: expected ':'
1021+
1022+
>>> class A[T]()
1023+
... pass
1024+
Traceback (most recent call last):
1025+
SyntaxError: expected ':'
1026+
10121027
>>> class R&D:
10131028
... pass
10141029
Traceback (most recent call last):

0 commit comments

Comments
 (0)