[Issue 23970] [REG2.097.0] Deprecation not emitted when selectively importing deprecated function

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 13 08:06:16 UTC 2023


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

RazvanN <razvan.nitu1305 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305 at gmail.com

--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
I think this behavior is fine. Note that `fun` may also have a non-deprecated
overload, in which case you are selectively importing an overload set. In that
case, it would be wrong to output a deprecation. In this case, checking all
overloads for a non-deprecated one seems like an overkill. From that point of
view, having an overload set of just one overload means that we don't have to
output the deprecation. Of course, a special case can be added: for overload
sets with just one overload check if it is deprecated, but this seems overkill
to me; the deprecation is going to be issued at the call site any way.

--


More information about the Digitalmars-d-bugs mailing list