[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 07:15:01 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20116
--- Comment #4 from Simen Kjaeraas <simen.kjaras at gmail.com> ---
It's not just an interesting approach - it's the *right* approach. When you
call the delegate, you don't pass it a context, so you can't decide whether the
result should be const or immutable at that point - the constancy is set in
stone the moment you create it, so that's when the type should be decided.
Sadly, this would do nothing for issue 15651 - it's not creating a delegate
from a struct or a class instance, so this change would have no impact
whatsoever. 15651 is just a case where Unqual isn't doing all the things it
perhaps should, or possibly a situation where inout simply breaks down.
--
More information about the Digitalmars-d-bugs
mailing list