Bug 23807 – FunctionLiteral spec should not use Parameters

Status
RESOLVED
Resolution
INVALID
Severity
minor
Priority
P1
Component
dlang.org
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2023-03-24T10:34:26Z
Last change time
2023-06-12T15:27:54Z
Keywords
pull
Assigned to
No Owner
Creator
Nick Treleaven

Comments

Comment #0 by nick — 2023-03-24T10:34:26Z
https://dlang.org/spec/expression.html#FunctionLiteral https://dlang.org/spec/function.html#Parameters Parameter requires a type but can omit the identifier. A FunctionLiteral parameter is different, it can omit the type. PR incoming.
Comment #1 by dlang-bot — 2023-03-24T10:47:57Z
@ntrel created dlang/dlang.org pull request #3568 "Fix Issue 23807 - FunctionLiteral spec should not use Parameters" fixing this issue: - Fix Issue 23807 - FunctionLiteral spec should not use Parameters A literal's parameter can just be a FundamentalType or `...` but in all other cases an identifier is required. Also use list for description and add item for omitted parameter types. function.dd: Merge two variants of ParameterList grammar using OPT. https://github.com/dlang/dlang.org/pull/3568
Comment #2 by nick — 2023-06-12T15:27:54Z
The parsing is actually valid with Parameters, just the semantics are different. Documented that parameter types can be omitted here: https://github.com/dlang/dlang.org/pull/3600