www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 549] New: A class derived from a deprecated class is not caught

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=549

           Summary: A class derived from a deprecated class is not caught
           Product: D
           Version: 0.174
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: smjg iname.com


DMD allows you to derive a non-deprecated class from a deprecated class.  You
can even instantiate the derived class, and use it to access the deprecated
class's members, thereby bypassing the deprecation!

----------
import std.stdio;

deprecated class DepClass {
    void test() {
        writefln("Accessing what's deprecated!");
    }
}

class Derived : DepClass {}

void main() {
    Derived d = new Derived;
    d.test();
}
----------


-- 
Nov 17 2006
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=549


smjg iname.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 1.021, 2.005


-- 
Oct 09 2007