Thread overview
[Issue 7947] typeof on anonymous function literal returns void
May 05, 2018
Johannes Loher
Dec 17, 2022
Iain Buclaw
Mar 24, 2023
Nick Treleaven
May 05, 2018
https://issues.dlang.org/show_bug.cgi?id=7947

Johannes Loher <johannes.loher@fg4f.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |johannes.loher@fg4f.de

--- Comment #4 from Johannes Loher <johannes.loher@fg4f.de> ---
Related: https://issues.dlang.org/show_bug.cgi?id=15437

I briefly talked to both Andrei and Walter today at dconf about this. They both agreed, that calling typeof on a template should be an error (similiar to how calling typeof on a type is an error).

Any thoughts on that?

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=7947

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P3

--
March 24, 2023
https://issues.dlang.org/show_bug.cgi?id=7947

Nick Treleaven <nick@geany.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |nick@geany.org
         Resolution|---                         |WONTFIX

--- Comment #5 from Nick Treleaven <nick@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

--