digitalmars.D.bugs - [Issue 549] New: A class derived from a deprecated class is not caught
- d-bugmail puremagic.com (30/30) Nov 17 2006 http://d.puremagic.com/issues/show_bug.cgi?id=549
- d-bugmail puremagic.com (9/9) Oct 09 2007 http://d.puremagic.com/issues/show_bug.cgi?id=549
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
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








d-bugmail puremagic.com