bpo-32023: Disallow genexprs without parenthesis in class definitions. (#4400)

diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index c8cb705..e161f56 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -153,6 +153,10 @@
 SyntaxError: Generator expression must be parenthesized
 >>> f((x for x in L), 1)
 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
+>>> class C(x for x in L):
+...     pass
+Traceback (most recent call last):
+SyntaxError: invalid syntax
 
 >>> def g(*args, **kwargs):
 ...     print(args, sorted(kwargs.items()))