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: [email protected]
Reporter: [email protected]
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
}
--