www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17505] New: [REG2.075] safe constructor requires the


          Issue ID: 17505
           Summary: [REG2.075]  safe constructor requires the
                    deconstructor to be safe as well
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

cat > main.d << CODE
struct Array
    int[] _payload;
        import core.stdc.stdlib : free;

class Scanner
    Array arr;
    this()  safe {}

$ dmd -main

main.d(14): Error:  safe constructor 'main.Scanner.this' cannot call  system
destructor 'main.Scanner.~this'

Jun 14 2017