www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 545] New: Attempt to access a static built-in property of a deprecated struct, union, enum or typedef is not caught

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

           Summary: Attempt to access a static built-in property of a
                    deprecated struct, union, enum or typedef 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


The types defined in this code are all deprecated.  However, the compiler fails
to report a single error for the attempts to access static, built-in properties
of these types.

For deprecated class and alias types, the compiler correctly diagnoses an
error.

----------
deprecated {
        struct DepStruct {}
        union DepUnion {}
        enum DepEnum { A }
        typedef int DepTypedef;
}

const structSize = DepStruct.sizeof;
const unionSize = DepUnion.sizeof;
const enumSize = DepEnum.sizeof;
const typedefSize = DepTypedef.sizeof;
const structInit = DepStruct.init;
const unionInit = DepUnion.init;
const enumInit = DepEnum.init;
const typedefInit = DepTypedef.init;
const enumMin = DepEnum.min;
const typedefMin = DepTypedef.min;
----------


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


bugzilla digitalmars.com changed:

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





Fixed dmd 1.032 and 2.016


-- 
Jul 09 2008