[Issue 17871] Delegate type inference doesn't work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 2 10:42:02 UTC 2017


https://issues.dlang.org/show_bug.cgi?id=17871

ag0aep6g at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |ag0aep6g at gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from ag0aep6g at gmail.com ---
This comes down to:

----
auto wrapper = (size_t) {};
----

It doesn't compile because "size_t" is not the parameter type here. It's the
parameter *name*. Since the parameter has no type, the function literal is a
template. A template has no type, and you can't put it in a variable.

Closing as invalid. Reopen if I'm missing the point.

--


More information about the Digitalmars-d-bugs mailing list