Skip to content

Commit 220bcc9

Browse files
authored
gh-110938: More syntax tests for PEP695 funcs and classes (#110986)
1 parent 411d6a6 commit 220bcc9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Lib/test/test_syntax.py

+15
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)