[Issue 13738] New: RTInfo generation on deprecated struct causes deprecation message
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Nov 16 03:10:44 PST 2014
https://issues.dlang.org/show_bug.cgi?id=13738
Issue ID: 13738
Summary: RTInfo generation on deprecated struct causes
deprecation message
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: r.sagitario at gmx.de
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.
--
More information about the Digitalmars-d-bugs
mailing list