https://issues.dlang.org/show_bug.cgi?id=21831
Issue ID: 21831 Summary: Wrong deprecation message in template parameters before evaluating constraints Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: ibuc...@gdcproject.org deprecated struct OldStruct { } struct NewStruct { } auto foo(T)(T t) // error: struct `OldStruct` is deprecated if (!__traits(isDeprecated, T)) { return T.init; } deprecated auto foo(T)(T t) if (__traits(isDeprecated, T)) { return T.init; } deprecated unittest { auto b = foo(OldStruct()); // instantiated from here } --