[Issue 7176] Lambda => syntax for function and methods too
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Dec 30 09:00:28 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=7176
Max Samukha <maxsamukha at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |maxsamukha at gmail.com
--- Comment #23 from Max Samukha <maxsamukha at gmail.com> ---
(In reply to Dlang Bot from comment #22)
> dlang/dmd pull request #11833 "Implement shortened methods with => syntax"
> was merged into master:
>
> - e6850f8a241192e24869f9b7ad608b52706e1aa5 by Nicholas Lindsay Wilson:
> I am not convinced it is worth special-casing
> the simple "=> y ALWAYS means "{ return y; }" rule for
> this case and thus left it alone.
>
C raises its ugly head again. With a proper unit type, "=> void.init;" would be
rewritten to "{ return void.init; }".
--
More information about the Digitalmars-d-bugs
mailing list