bpo-40334: Reproduce error message for type comments on bare '*' in the new parser (GH-20151)
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index 87ceced..a82b444 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -178,6 +178,16 @@
Traceback (most recent call last):
SyntaxError: invalid syntax
+>>> import ast; ast.parse('''
+... def f(
+... *, # type: int
+... a, # type: int
+... ):
+... pass
+... ''', type_comments=True)
+Traceback (most recent call last):
+SyntaxError: bare * has associated type comment
+
From ast_for_funcdef():