digitalmars.D.bugs - [Issue 21830] New: Wrong deprecation message when non-deprecated
- d-bugmail puremagic.com (35/35) Apr 15 2021 https://issues.dlang.org/show_bug.cgi?id=21830
https://issues.dlang.org/show_bug.cgi?id=21830 Issue ID: 21830 Summary: Wrong deprecation message when non-deprecated function in static condition Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: ibuclaw gdcproject.org deprecated struct OldStruct { } struct NewStruct { } static if (1) { auto getInit(T)(T t) if (is(T == NewStruct)) { return T.init; } } deprecated("Using deprecated overload") auto getInit(T)(T t) if (is(T == OldStruct)) { return T.init; } unittest { auto b = getInit(NewStruct()); // error here about using getInit!OldStruct } --
Apr 15 2021