Uncallable delegates
Walter Bright
newshound2 at digitalmars.com
Thu May 14 19:34:24 UTC 2026
On 5/13/2026 1:30 PM, Dukc wrote:
> Returning to the DIP, the issue with the present rules are that calling a
> `const` delegate (or equally `immutable`, `shared` or `inout` delegate) without
> the `const` for the context parameter is allowed. It shouldn't be, just like the
> equivalent function pointer rewrite we just discussed isn't. My DIP is proposing
> disallowing it, along with changes to the qualifier casting rules of delegates.
I'm glad we are understanding each other better.
I'm not convinced the proposed change improves things.
More information about the dip.development
mailing list