[Issue 20609] New: Disabled and deprecated functions show up as candidate

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 26 04:24:02 UTC 2020


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

          Issue ID: 20609
           Summary: Disabled and deprecated functions show up as candidate
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: diagnostic
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: pro.mathias.lang at gmail.com

```
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.

--


More information about the Digitalmars-d-bugs mailing list