www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14242] New: destruction of static arrays with elaborate

https://issues.dlang.org/show_bug.cgi?id=14242

          Issue ID: 14242
           Summary: destruction of static arrays with elaborate destructor
                    elements does not propagate attributes
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: jakobovrum gmail.com

This should compile:
--------
struct S
{
    ~this()  safe {}
}

void main()  safe
{
    S[1] arr;
}
--------
test.d(8): Error: safe function 'D main' cannot call system function
'object.TypeInfo.destroy'
--------

--
Mar 03 2015