gh-110938: More syntax tests for PEP695 funcs and classes (#110986)

This commit is contained in:
Nikita Sobolev 2023-10-18 08:00:04 +03:00 committed by GitHub
parent 411d6a638e
commit 220bcc9e27
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):