[Issue 16404] Funky type for parameterless lambdas () => { ... }
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Aug 19 11:45:53 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16404
Cauterite <cauterite at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cauterite at gmail.com
--- Comment #1 from Cauterite <cauterite at gmail.com> ---
i think you made the mistake of writing
() => {}
when you actually mean
() {}
the compiler interprets `() => {}` as a lambda which returns another lambda
`{}`
not to be confused with the same syntax in JavaScript, which works the way you
expected it to work here.
--
More information about the Digitalmars-d-bugs
mailing list