Empty functions

Jan Hönig hrominium at gmail.com
Thu Oct 29 09:01:12 UTC 2020


On Thursday, 29 October 2020 at 08:48:59 UTC, rikki cattermole 
wrote:
> () => {}
>
> Is actually:
>
> () => Expression
>
> Rule: ref|opt ParameterWithMemberAttributes => AssignExpression
>
> https://dlang.org/spec/expression.html#lambdas

This would mean, that this one should work as well.
And you can![1]

I have changed line 13 from `F();` to `return F();`.
Why does this help???
This is a little weird.



[1]: https://run.dlang.io/is/eGah5v





More information about the Digitalmars-d-learn mailing list