[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 220bcc9e27)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2023-10-18 08:02:17 +02:00 committed by GitHub
parent 2bca5f43af
commit 004618fed7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1004,11 +1004,26 @@ Missing ':' before suites:
Traceback (most recent call last):
SyntaxError: expected ':'
>>> def f[T]()
... pass
Traceback (most recent call last):
SyntaxError: expected ':'
>>> class A
... pass
Traceback (most recent call last):
SyntaxError: expected ':'
>>> class A[T]
... pass
Traceback (most recent call last):
SyntaxError: expected ':'
>>> class A[T]()
... pass
Traceback (most recent call last):
SyntaxError: expected ':'
>>> class R&D:
... pass
Traceback (most recent call last):