[Issue 7947] typeof on anonymous function literal returns void
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 24 13:42:57 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=7947
Nick Treleaven <nick at geany.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |nick at geany.org
Resolution|--- |WONTFIX
--- Comment #5 from Nick Treleaven <nick at geany.org> ---
This is documented now:
"If a function literal is aliased, the inference of the parameter types is done
when the types are needed, as the function literal becomes a template."
https://dlang.org/spec/expression.html#lambda-parameter-inference
"If the expression is a Template, typeof gives the type void."
https://dlang.org/spec/type.html#typeof
--
More information about the Digitalmars-d-bugs
mailing list