[Issue 23491] Nonsensical deprecation message when using delegate

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 18 13:53:38 UTC 2022


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

--- Comment #2 from Mathias LANG <pro.mathias.lang at gmail.com> ---
(In reply to RazvanN from comment #1)
> I would argue that problem number 2 is not valid. The compiler just [...]

The problem I see is that the message is misleading without extra information.
In this case, to understand it, one needs to look at `unsignedToTempString`
signature. The fix, in that case, is to change `sink` signature.

Note that I am not saying that the message is *incorrect* (it most definitely
is correct) or that it shouldn't mention `buffer` - Just that it can & should
be improved, perhaps with an `errorSupplemental` (`deprecationSupplemental`
here) so that people don't get stuck looking at the call that returns the
reference, instead of how the returned reference is used.

--


More information about the Digitalmars-d-bugs mailing list