(Params){ FunctionBody; }

Rule: ref|opt ParameterWithMemberAttributes FunctionLiteralBody

https://dlang.org/spec/expression.html#function_literals




void function()

Is a type https://dlang.org/spec/type.html#delegates




() => {}

Is actually:

() => Expression

Rule: ref|opt ParameterWithMemberAttributes => AssignExpression

https://dlang.org/spec/expression.html#lambdas

Reply via email to