[Issue 9603] Signals must work with closure delegates

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 12 12:56:24 UTC 2019


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

berni44 <bugzilla at d-ecke.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla at d-ecke.de
         Resolution|---                         |WONTFIX

--- Comment #3 from berni44 <bugzilla at d-ecke.de> ---
I don't see a possibility to fix this inside of phobos. A complete rewrite of
the module would probably be needed. For a fix outside of phobos see the two
issues mentioned above.

I started a PR [1] though, which adds closures to the warning and marks the
warning in red.

If anyone cares: The problem is in a call to _d_toObject, which is to be found
inside of the runtime [2]. The docs for this function allready tell, that it
will crash if called the wrong way. Adding an exception inside phobos before
the crash seems not to be possible, because it's not possible to distinguish a
"normal" delegate from a closure.

[1] https://github.com/dlang/phobos/pull/7268
[2] https://dlang.org/library/rt/cast_/_d_to_object.html

--


More information about the Digitalmars-d-bugs mailing list