Change the RTInfo declaration in object.di and object_.d to
////////////////////////////////////////////////////////
template RTInfo(T)
{
enum RTInfo = cast(void*)RTInfoImpl!T;
}
template RTInfoImpl(T)
{
enum RTInfoImpl = &RTInfoImpl2!T;
}
template RTInfoImpl2(T)
{
immutable RTInfoImpl2 = 1234;
}
////////////////////////////////////////////////////////
and then compile a predrecated class or struct:
/////////////////////////////////////
module test;
deprecated class Dep { }
/////////////////////////////////////
emits
Deprecation: class test.Dep is deprecated
As long as Dep is not actually used, the compiler should not emit a message.
I think the root of diagnostic problem is issue 14875.
If a template is instantiated with deprecated type, the touch to corresponding type parameter should not repeat redundant deprecation messages.
Comment #5 by k.hara.pg — 2015-08-06T11:18:42Z
This issue itself is already fixed.
Comment #6 by github-bugzilla — 2015-08-08T05:43:49Z