Thread overview | |||||
---|---|---|---|---|---|
|
June 13, 2023 [Issue 23970] [REG2.097.0] Deprecation not emitted when selectively importing deprecated function | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23970 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |razvan.nitu1305@gmail.com --- Comment #1 from RazvanN <razvan.nitu1305@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. -- |
June 13, 2023 [Issue 23970] [REG2.097.0] Deprecation not emitted when selectively importing deprecated function | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23970 --- Comment #2 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> --- That sounds fine to me. I just want to note that maybe deprecation should be a property that is tracked for overload sets; then, maintaining that property on the overload set, and checking if all of the functions in the overload set are deprecated, become a O(1) operation. -- |
June 13, 2023 [Issue 23970] [REG2.097.0] Deprecation not emitted when selectively importing deprecated function | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=23970 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #3 from RazvanN <razvan.nitu1305@gmail.com> --- Yes, it could be implemented, however it will add cyclomatic complexity for no apparent benefit since the deprecation is issued on the call site anyway. -- |
Copyright © 1999-2021 by the D Language Foundation