Bug 20609 – Disabled and deprecated functions show up as candidate

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-02-26T04:24:02Z
Last change time
2020-03-01T09:22:41Z
Keywords
diagnostic, pull
Assigned to
No Owner
Creator
Mathias LANG

Comments

Comment #0 by pro.mathias.lang — 2020-02-26T04:24:02Z
``` struct Foo { @disable this(); deprecated this(Object) {} this(string[] args) {} } void main() { auto f = Foo(42); } ``` As of DMD v2.090.1: ``` disabled.d(10): Error: none of the overloads of this are callable using argument types (int), candidates are: disabled.d(3): disabled.Foo.this() disabled.d(4): disabled.Foo.this(Object _param_0) disabled.d(5): disabled.Foo.this(string[] args) ``` The compiler shouldn't suggest disabled symbols, and probably not deprecated ones as well. Fix on the way.
Comment #1 by dlang-bot — 2020-02-26T09:24:04Z
@Geod24 created dlang/dmd pull request #10838 "Fix issue 20609 - Disabled and deprecated functions show up as candidate" fixing this issue: - Fix issue 20609 - Disabled and deprecated functions show up as candidate Do not show disabled functions as candidate or hints. Only show deprecated functions when inside a deprecated scope. https://github.com/dlang/dmd/pull/10838
Comment #2 by dlang-bot — 2020-03-01T09:22:41Z
dlang/dmd pull request #10838 "Fix issue 20609 - Disabled and deprecated functions show up as candidate" was merged into master: - fd548ddd2abded59f4c4511c8f12dc3f90913712 by Geod24: Fix issue 20609 - Disabled and deprecated functions show up as candidate Do not show disabled functions as candidate or hints. Only show deprecated functions when inside a deprecated scope. https://github.com/dlang/dmd/pull/10838