www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13738] New: RTInfo generation on deprecated struct causes


          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 puremagic.com
          Reporter: r.sagitario 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 { }


Deprecation: class test.Dep is deprecated

As long as Dep is not actually used, the compiler should not emit a message.

Nov 16 2014