www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21372] New: False deprecation raised for templated overloaded

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

          Issue ID: 21372
           Summary: False deprecation raised for templated overloaded
                    struct method
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: default_357-line yahoo.de

Consider the following code:

``` D
struct S {
        deprecated("no") void foo(T)(int) { }
        void foo(T)(string) { }
}

void main() { S().foo!int("hi"); }
```
Since 2.094.0, this raises a deprecation warning, despite the fact that the
overloaded call to foo doesn't select the deprecated version of foo.

--
Nov 08 2020