gh-122245: Add test case of generic type with __debug__ (#122322)

This commit is contained in:
Irit Katriel 2024-07-26 19:40:36 +01:00 committed by GitHub
parent 1ca99ed240
commit d791b9815a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -2265,6 +2265,10 @@ Invalid expressions in type scopes:
Traceback (most recent call last):
SyntaxError: cannot assign to __debug__
>>> class A[__debug__]: pass
Traceback (most recent call last):
SyntaxError: cannot assign to __debug__
>>> class A[T]((x := 3)): ...
Traceback (most recent call last):
...