digitalmars.D.bugs - [Issue 19258] New: Cannot disable ~this()
- d-bugmail puremagic.com (25/25) Sep 21 2018 https://issues.dlang.org/show_bug.cgi?id=19258
https://issues.dlang.org/show_bug.cgi?id=19258 Issue ID: 19258 Summary: Cannot disable ~this() Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: ilyayaroshenko gmail.com Fails: struct S { this(int i){} disable ~this(){} } extern(C++) S foo() { return S(3); } It should compiles because destructor is not called in `foo`. --
Sep 21 2018