[Parse] Error if closure has an unnamed parameter

We accepted unnamed closure parameters if the type was an array literal, dictionary literal, tuple or function (because the `[` or `(` starting the type was sufficient to disambiguate the type from the parameter’s name). This was never an accepted syntax and we should disallow it.
This commit is contained in:
Alex Hoppen
2023-11-28 10:59:17 -08:00
parent 9b10ab3210
commit 4ba4da45b9
5 changed files with 10 additions and 29 deletions

View File

@@ -1029,8 +1029,6 @@ ERROR(parameter_operator_keyword_argument,none,
ERROR(parameter_unnamed,none,
"unnamed parameters must be written with the empty name '_'", ())
WARNING(parameter_unnamed_warn,none,
"unnamed parameters must be written with the empty name '_'", ())
ERROR(parameter_curry_syntax_removed,none,
"cannot have more than one parameter list", ())