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

Simen Kjaeraas <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |[email protected]
         Resolution|---                         |DUPLICATE

--- Comment #2 from Simen Kjaeraas <[email protected]> ---
The issue here is not what you think. 'callback' is a function, not a delegate,
and &S.func is indeed a function. This is hinted at by the error message saying
"cannot implicitly convert expression &s.func of type void delegate() to void
function()".

Now, it can certainly be argued that the type of &S.func should be void
function(S), but for some reason it is not, and this has been a known issue
(issue 2672) for at least 11 years.

*** This issue has been marked as a duplicate of issue 2672 ***

--

Reply via email to