[Issue 20116] Wrong delegate type when taking address of inout member function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Aug 16 11:40:51 UTC 2019


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

--- Comment #5 from Harry Vennik <htvennik at gmail.com> ---
The project I am working on suffers from both issues, so I just wanted to
ensure solving one would not worsen the other.

Though I agree that the type is to be determined at delegate creation. But what
would happen if a delegate is created from a struct or class reference that is
already inout? In that case there is no way but making the context inout.
Making it const would not be correct, because in that case, the return value of
the delegate would also be const if the delegate returns (part of) its context.

--


More information about the Digitalmars-d-bugs mailing list