www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20609] New: Disabled and deprecated functions show up as

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 puremagic.com
          Reporter: pro.mathias.lang 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.

--
Feb 25 2020